Chromium Code Reviews| Index: remoting/protocol/fake_session.h |
| diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h |
| index 7d31c9c064fc61f63987cd9c47e010a512cf90b6..6100136ff7822b5eee4324f3e103b6c2f383e9d7 100644 |
| --- a/remoting/protocol/fake_session.h |
| +++ b/remoting/protocol/fake_session.h |
| @@ -5,6 +5,7 @@ |
| #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_ |
| #define REMOTING_PROTOCOL_FAKE_SESSION_H_ |
| +#include <deque> |
| #include <map> |
| #include <memory> |
| #include <string> |
| @@ -14,6 +15,7 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "base/time/time.h" |
| #include "remoting/protocol/fake_stream_socket.h" |
| +#include "remoting/protocol/jingle_messages.h" |
| #include "remoting/protocol/session.h" |
| #include "remoting/protocol/transport.h" |
| @@ -40,6 +42,11 @@ class FakeSession : public Session { |
| signaling_delay_ = signaling_delay; |
| } |
| + // Adds an |attachment| to |round|, which will be sent to plugins added by |
| + // AddPlugin() function. |
| + void SetAttachment(size_t round, |
|
Sergey Ulanov
2017/01/09 23:00:26
int would be more appropriate here than size_t, bu
Hzj_jie
2017/01/10 02:31:10
Then it would be complex if the FakeSession has be
|
| + std::unique_ptr<buzz::XmlElement> attachment); |
| + |
| // Session interface. |
| void SetEventHandler(EventHandler* event_handler) override; |
| ErrorCode error() override; |
| @@ -70,6 +77,8 @@ class FakeSession : public Session { |
| base::WeakPtr<FakeSession> peer_; |
| base::TimeDelta signaling_delay_; |
| + std::deque<JingleMessage> attachments_; |
|
Sergey Ulanov
2017/01/09 23:00:26
I'd prefer to avoid using std::deque<> anywhere in
Hzj_jie
2017/01/10 02:31:10
It's a little bit complex, and relates to the impl
Sergey Ulanov
2017/01/23 00:51:35
I don't think you need to store JingleMessages her
Hzj_jie
2017/02/08 01:56:29
Done.
|
| + |
| base::WeakPtrFactory<FakeSession> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(FakeSession); |