| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 namespace protocol { | 35 namespace protocol { |
| 36 | 36 |
| 37 class Authenticator; | 37 class Authenticator; |
| 38 class ClientControlDispatcher; | 38 class ClientControlDispatcher; |
| 39 class ClientEventDispatcher; | 39 class ClientEventDispatcher; |
| 40 class ClientStub; | 40 class ClientStub; |
| 41 class ClipboardStub; | 41 class ClipboardStub; |
| 42 class HostStub; | 42 class HostStub; |
| 43 class InputStub; | 43 class InputStub; |
| 44 class SessionConfig; | 44 class SessionConfig; |
| 45 class TransportFactory; |
| 45 class VideoReader; | 46 class VideoReader; |
| 46 class VideoStub; | 47 class VideoStub; |
| 47 | 48 |
| 48 class ConnectionToHost : public SignalStrategy::Listener, | 49 class ConnectionToHost : public SignalStrategy::Listener, |
| 49 public SessionManager::Listener { | 50 public SessionManager::Listener { |
| 50 public: | 51 public: |
| 51 enum State { | 52 enum State { |
| 52 CONNECTING, | 53 CONNECTING, |
| 53 CONNECTED, | 54 CONNECTED, |
| 54 FAILED, | 55 FAILED, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 65 | 66 |
| 66 ConnectionToHost(base::MessageLoopProxy* message_loop, | 67 ConnectionToHost(base::MessageLoopProxy* message_loop, |
| 67 pp::Instance* pp_instance, | 68 pp::Instance* pp_instance, |
| 68 bool allow_nat_traversal); | 69 bool allow_nat_traversal); |
| 69 virtual ~ConnectionToHost(); | 70 virtual ~ConnectionToHost(); |
| 70 | 71 |
| 71 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, | 72 virtual void Connect(scoped_refptr<XmppProxy> xmpp_proxy, |
| 72 const std::string& local_jid, | 73 const std::string& local_jid, |
| 73 const std::string& host_jid, | 74 const std::string& host_jid, |
| 74 const std::string& host_public_key, | 75 const std::string& host_public_key, |
| 76 scoped_ptr<TransportFactory> transport_factory, |
| 75 scoped_ptr<Authenticator> authenticator, | 77 scoped_ptr<Authenticator> authenticator, |
| 76 HostEventCallback* event_callback, | 78 HostEventCallback* event_callback, |
| 77 ClientStub* client_stub, | 79 ClientStub* client_stub, |
| 78 ClipboardStub* clipboard_stub, | 80 ClipboardStub* clipboard_stub, |
| 79 VideoStub* video_stub); | 81 VideoStub* video_stub); |
| 80 | 82 |
| 81 virtual void Disconnect(const base::Closure& shutdown_task); | 83 virtual void Disconnect(const base::Closure& shutdown_task); |
| 82 | 84 |
| 83 virtual const SessionConfig& config(); | 85 virtual const SessionConfig& config(); |
| 84 | 86 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 115 void OnVideoPacket(VideoPacket* packet); | 117 void OnVideoPacket(VideoPacket* packet); |
| 116 | 118 |
| 117 void CloseOnError(ErrorCode error); | 119 void CloseOnError(ErrorCode error); |
| 118 | 120 |
| 119 // Stops writing in the channels. | 121 // Stops writing in the channels. |
| 120 void CloseChannels(); | 122 void CloseChannels(); |
| 121 | 123 |
| 122 void SetState(State state, ErrorCode error); | 124 void SetState(State state, ErrorCode error); |
| 123 | 125 |
| 124 scoped_refptr<base::MessageLoopProxy> message_loop_; | 126 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 125 pp::Instance* pp_instance_; | |
| 126 bool allow_nat_traversal_; | 127 bool allow_nat_traversal_; |
| 127 | 128 |
| 128 std::string host_jid_; | 129 std::string host_jid_; |
| 129 std::string host_public_key_; | 130 std::string host_public_key_; |
| 130 scoped_ptr<Authenticator> authenticator_; | 131 scoped_ptr<Authenticator> authenticator_; |
| 131 | 132 |
| 132 HostEventCallback* event_callback_; | 133 HostEventCallback* event_callback_; |
| 133 | 134 |
| 134 // Stub for incoming messages. | 135 // Stub for incoming messages. |
| 135 ClientStub* client_stub_; | 136 ClientStub* client_stub_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 151 ErrorCode error_; | 152 ErrorCode error_; |
| 152 | 153 |
| 153 private: | 154 private: |
| 154 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 155 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
| 155 }; | 156 }; |
| 156 | 157 |
| 157 } // namespace protocol | 158 } // namespace protocol |
| 158 } // namespace remoting | 159 } // namespace remoting |
| 159 | 160 |
| 160 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 161 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| OLD | NEW |