Chromium Code Reviews| Index: remoting/host/host_experiment_session_plugin.h |
| diff --git a/remoting/host/host_experiment_session_plugin.h b/remoting/host/host_experiment_session_plugin.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4be1472d98e9e2e1a301609d6868113bcf7cc902 |
| --- /dev/null |
| +++ b/remoting/host/host_experiment_session_plugin.h |
| @@ -0,0 +1,36 @@ |
| +// 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_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
| +#define REMOTING_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
| + |
| +#include <memory> |
| +#include <string> |
| + |
| +#include "remoting/protocol/session_plugin.h" |
| +#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
| + |
| +namespace remoting { |
| + |
| +// A SessionPlugin implementation to send host attributes to client, and |
| +// receives experiment settings. This plugin is for host only. |
|
Sergey Ulanov
2017/01/05 20:45:06
Don't need the last sentence. It's implied by loca
Hzj_jie
2017/01/05 23:37:27
Done.
|
| +class HostExperimentSessionPlugin : public protocol::SessionPlugin { |
| + public: |
| + using SessionPlugin::SessionPlugin; |
| + |
| + std::unique_ptr<buzz::XmlElement> GetNextMessage() override; |
|
Sergey Ulanov
2017/01/05 20:45:06
// protocol::SessionPlugin implementation.
Hzj_jie
2017/01/05 23:37:27
Done.
|
| + |
| + void OnIncomingMessage(const buzz::XmlElement& attachments) override; |
| + |
| + // The configuration sent from client, may be empty. |
| + const std::string& configuration() const; |
| + |
| + private: |
| + bool attributes_sent_ = false; |
| + std::string configuration_; |
| +}; |
| + |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |