Index: remoting/protocol/host_experiment_session_plugin.h |
diff --git a/remoting/protocol/host_experiment_session_plugin.h b/remoting/protocol/host_experiment_session_plugin.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4f0179f9653cc127c74b511c54713b785faaf13e |
--- /dev/null |
+++ b/remoting/protocol/host_experiment_session_plugin.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef REMOTING_PROTOCOL_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
+#define REMOTING_PROTOCOL_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
+ |
+#include <memory> |
+#include <string> |
+ |
+#include "remoting/protocol/jingle_messages.h" |
+#include "remoting/protocol/session.h" |
+#include "remoting/protocol/session_plugin.h" |
+#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
+ |
+namespace remoting { |
+namespace protocol { |
+ |
+// A SessionPlugin implementation to send host attributes to client, and |
+// receives experiment settings. This plugin is for host only. |
+class HostExperimentSessionPlugin : public SessionPlugin { |
+ public: |
+ using SessionPlugin::SessionPlugin; |
+ |
+ void OnSending(Session::State state, |
+ JingleMessage::ActionType action, |
+ std::unique_ptr<buzz::XmlElement>* attachments) override; |
+ |
+ void OnReceiving( |
+ Session::State state, |
+ JingleMessage::ActionType action, |
+ const std::unique_ptr<buzz::XmlElement>& attachments) override; |
+ |
+ // The configuration sent from client, may be empty. |
+ const std::string& configuration() const; |
+ |
+ private: |
+ std::string configuration_; |
+}; |
+ |
+} // namespace protocol |
+} // namespace remoting |
+ |
+#endif // REMOTING_PROTOCOL_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |