Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: remoting/protocol/protocol_mock_objects.h

Issue 2615113005: [Chromoting] Use HostExperimentSessionPlugin in host (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/protocol_mock_objects.h
diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h
index bb5a45725c8164432049adf3d8517ed2b0b1c557..8aad5123af23beb47c5762dec6ec4ab919116dd4 100644
--- a/remoting/protocol/protocol_mock_objects.h
+++ b/remoting/protocol/protocol_mock_objects.h
@@ -6,6 +6,7 @@
#define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_
#include <cstdint>
+#include <deque>
#include <map>
#include <memory>
#include <string>
@@ -25,6 +26,7 @@
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/input_stub.h"
+#include "remoting/protocol/jingle_messages.h"
#include "remoting/protocol/pairing_registry.h"
#include "remoting/protocol/session.h"
#include "remoting/protocol/session_manager.h"
@@ -203,9 +205,17 @@ class MockSession : public Session {
MOCK_METHOD0(jid, const std::string&());
MOCK_METHOD0(config, const SessionConfig&());
MOCK_METHOD1(Close, void(ErrorCode error));
- MOCK_METHOD1(AddPlugin, void(SessionPlugin* plugin));
+
+ // Sends |attachments_| to the |plugin|->OnIncomingMessage().
+ void AddPlugin(SessionPlugin* plugin) override;
+
+ // Adds an |attachment| to |round|, which will be sent to plugins added by
+ // AddPlugin() function.
+ void SetAttachment(size_t round,
Sergey Ulanov 2017/01/07 01:23:09 It's better to avoid mixing non-GMock code into Mo
Hzj_jie 2017/01/08 23:48:49 Done.
+ std::unique_ptr<buzz::XmlElement> attachment);
private:
+ std::deque<JingleMessage> attachments_;
DISALLOW_COPY_AND_ASSIGN(MockSession);
};

Powered by Google App Engine
This is Rietveld 408576698