Index: webrtc/media/base/fakemediaengine.h |
diff --git a/webrtc/media/base/fakemediaengine.h b/webrtc/media/base/fakemediaengine.h |
index cbd4e6ef268046de645d5843582fc24c4af8a2dd..932427b9b41ef845dbab57da9a1e84d5fb01d649 100644 |
--- a/webrtc/media/base/fakemediaengine.h |
+++ b/webrtc/media/base/fakemediaengine.h |
@@ -942,9 +942,11 @@ inline FakeVideoMediaChannel::~FakeVideoMediaChannel() { |
class FakeDataEngine : public DataEngineInterface { |
public: |
- FakeDataEngine(){}; |
+ FakeDataEngine() : last_channel_type_(DCT_NONE) {} |
- virtual DataMediaChannel* CreateChannel(const MediaConfig& config) { |
+ virtual DataMediaChannel* CreateChannel(DataChannelType data_channel_type, |
+ const MediaConfig& config) { |
+ last_channel_type_ = data_channel_type; |
FakeDataMediaChannel* ch = new FakeDataMediaChannel(this, DataOptions()); |
channels_.push_back(ch); |
return ch; |
@@ -964,9 +966,12 @@ class FakeDataEngine : public DataEngineInterface { |
virtual const std::vector<DataCodec>& data_codecs() { return data_codecs_; } |
+ DataChannelType last_channel_type() const { return last_channel_type_; } |
+ |
private: |
std::vector<FakeDataMediaChannel*> channels_; |
std::vector<DataCodec> data_codecs_; |
+ DataChannelType last_channel_type_; |
}; |
} // namespace cricket |