OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
| 6 #define REMOTING_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <string> |
| 10 |
| 11 #include "remoting/protocol/session_plugin.h" |
| 12 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
| 13 |
| 14 namespace remoting { |
| 15 |
| 16 // A SessionPlugin implementation to send host attributes to client, and |
| 17 // receives experiment settings. |
| 18 class HostExperimentSessionPlugin : public protocol::SessionPlugin { |
| 19 public: |
| 20 using SessionPlugin::SessionPlugin; |
| 21 |
| 22 // protocol::SessionPlug implementation. |
| 23 std::unique_ptr<buzz::XmlElement> GetNextMessage() override; |
| 24 |
| 25 void OnIncomingMessage(const buzz::XmlElement& attachments) override; |
| 26 |
| 27 // Whether we have received configuration from client. |
| 28 bool configuration_received() const; |
| 29 |
| 30 // The configuration sent from client, may be empty. |
| 31 const std::string& configuration() const; |
| 32 |
| 33 private: |
| 34 bool attributes_sent_ = false; |
| 35 bool configuration_received_ = false; |
| 36 std::string configuration_; |
| 37 }; |
| 38 |
| 39 } // namespace remoting |
| 40 |
| 41 #endif // REMOTING_HOST_HOST_EXPERIMENT_SESSION_PLUGIN_H_ |
OLD | NEW |