| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
| 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "remoting/protocol/connection_to_host.h" | 22 #include "remoting/protocol/connection_to_host.h" |
| 23 #include "remoting/protocol/cursor_shape_stub.h" | 23 #include "remoting/protocol/cursor_shape_stub.h" |
| 24 | 24 |
| 25 namespace remoting { | 25 namespace remoting { |
| 26 | 26 |
| 27 namespace protocol { | 27 namespace protocol { |
| 28 class ClipboardEvent; | 28 class ClipboardEvent; |
| 29 class CursorShapeInfo; | 29 class CursorShapeInfo; |
| 30 } // namespace protocol | 30 } // namespace protocol |
| 31 | 31 |
| 32 namespace client { |
| 33 class LogToServer; |
| 34 } |
| 35 |
| 32 class VideoRenderer; | 36 class VideoRenderer; |
| 33 | 37 |
| 34 // ClientUserInterface that indirectly makes and receives JNI calls. | 38 // ClientUserInterface that indirectly makes and receives JNI calls. |
| 35 class ChromotingJniInstance | 39 class ChromotingJniInstance |
| 36 : public ClientUserInterface, | 40 : public ClientUserInterface, |
| 37 public protocol::ClipboardStub, | 41 public protocol::ClipboardStub, |
| 38 public protocol::CursorShapeStub, | 42 public protocol::CursorShapeStub, |
| 39 public base::RefCountedThreadSafe<ChromotingJniInstance> { | 43 public base::RefCountedThreadSafe<ChromotingJniInstance> { |
| 40 public: | 44 public: |
| 41 // Initiates a connection with the specified host. Call from the UI thread. | 45 // Initiates a connection with the specified host. Call from the UI thread. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_; | 145 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_; |
| 142 | 146 |
| 143 // This group of variables is to be used on the network thread. | 147 // This group of variables is to be used on the network thread. |
| 144 ClientConfig client_config_; | 148 ClientConfig client_config_; |
| 145 scoped_ptr<ClientContext> client_context_; | 149 scoped_ptr<ClientContext> client_context_; |
| 146 scoped_ptr<VideoRenderer> video_renderer_; | 150 scoped_ptr<VideoRenderer> video_renderer_; |
| 147 scoped_ptr<protocol::ConnectionToHost> connection_; | 151 scoped_ptr<protocol::ConnectionToHost> connection_; |
| 148 scoped_ptr<ChromotingClient> client_; | 152 scoped_ptr<ChromotingClient> client_; |
| 149 XmppSignalStrategy::XmppServerConfig xmpp_config_; | 153 XmppSignalStrategy::XmppServerConfig xmpp_config_; |
| 150 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ | 154 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ |
| 155 scoped_ptr<client::LogToServer> log_to_server_; |
| 151 | 156 |
| 152 // Pass this the user's PIN once we have it. To be assigned and accessed on | 157 // Pass this the user's PIN once we have it. To be assigned and accessed on |
| 153 // the UI thread, but must be posted to the network thread to call it. | 158 // the UI thread, but must be posted to the network thread to call it. |
| 154 protocol::SecretFetchedCallback pin_callback_; | 159 protocol::SecretFetchedCallback pin_callback_; |
| 155 | 160 |
| 156 // Indicates whether to establish a new pairing with this host. This is | 161 // Indicates whether to establish a new pairing with this host. This is |
| 157 // modified in ProvideSecret(), but thereafter to be used only from the | 162 // modified in ProvideSecret(), but thereafter to be used only from the |
| 158 // network thread. (This is safe because ProvideSecret() is invoked at most | 163 // network thread. (This is safe because ProvideSecret() is invoked at most |
| 159 // once per run, and always before any reference to this flag.) | 164 // once per run, and always before any reference to this flag.) |
| 160 bool create_pairing_; | 165 bool create_pairing_; |
| 161 | 166 |
| 162 // The device name to appear in the paired-clients list. Accessed on the | 167 // The device name to appear in the paired-clients list. Accessed on the |
| 163 // network thread. | 168 // network thread. |
| 164 std::string device_name_; | 169 std::string device_name_; |
| 165 | 170 |
| 166 // If this is true, performance statistics will be periodically written to | 171 // If this is true, performance statistics will be periodically written to |
| 167 // the Android log. Used on the network thread. | 172 // the Android log. Used on the network thread. |
| 168 bool stats_logging_enabled_; | 173 bool stats_logging_enabled_; |
| 169 | 174 |
| 170 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 175 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
| 171 | 176 |
| 172 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 177 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
| 173 }; | 178 }; |
| 174 | 179 |
| 175 } // namespace remoting | 180 } // namespace remoting |
| 176 | 181 |
| 177 #endif | 182 #endif |
| OLD | NEW |