Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.h

Issue 320403002: Pull out common code from client and host versions of LogToServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12 matching lines...) Expand all
23 #include "remoting/protocol/connection_to_host.h" 23 #include "remoting/protocol/connection_to_host.h"
24 #include "remoting/protocol/cursor_shape_stub.h" 24 #include "remoting/protocol/cursor_shape_stub.h"
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 namespace protocol { 28 namespace protocol {
29 class ClipboardEvent; 29 class ClipboardEvent;
30 class CursorShapeInfo; 30 class CursorShapeInfo;
31 } // namespace protocol 31 } // namespace protocol
32 32
33 namespace client { 33 class LogToServerClient;
34 class LogToServer;
35 }
36
37 class VideoRenderer; 34 class VideoRenderer;
38 35
39 // ClientUserInterface that indirectly makes and receives JNI calls. 36 // ClientUserInterface that indirectly makes and receives JNI calls.
40 class ChromotingJniInstance 37 class ChromotingJniInstance
41 : public ClientUserInterface, 38 : public ClientUserInterface,
42 public protocol::ClipboardStub, 39 public protocol::ClipboardStub,
43 public protocol::CursorShapeStub, 40 public protocol::CursorShapeStub,
44 public base::RefCountedThreadSafe<ChromotingJniInstance> { 41 public base::RefCountedThreadSafe<ChromotingJniInstance> {
45 public: 42 public:
46 // Initiates a connection with the specified host. Call from the UI thread. 43 // Initiates a connection with the specified host. Call from the UI thread.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_; 150 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_;
154 151
155 // This group of variables is to be used on the network thread. 152 // This group of variables is to be used on the network thread.
156 ClientConfig client_config_; 153 ClientConfig client_config_;
157 scoped_ptr<ClientContext> client_context_; 154 scoped_ptr<ClientContext> client_context_;
158 scoped_ptr<VideoRenderer> video_renderer_; 155 scoped_ptr<VideoRenderer> video_renderer_;
159 scoped_ptr<protocol::ConnectionToHost> connection_; 156 scoped_ptr<protocol::ConnectionToHost> connection_;
160 scoped_ptr<ChromotingClient> client_; 157 scoped_ptr<ChromotingClient> client_;
161 XmppSignalStrategy::XmppServerConfig xmpp_config_; 158 XmppSignalStrategy::XmppServerConfig xmpp_config_;
162 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ 159 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_
163 scoped_ptr<client::LogToServer> log_to_server_; 160 scoped_ptr<LogToServerClient> log_to_server_;
164 161
165 // Pass this the user's PIN once we have it. To be assigned and accessed on 162 // Pass this the user's PIN once we have it. To be assigned and accessed on
166 // the UI thread, but must be posted to the network thread to call it. 163 // the UI thread, but must be posted to the network thread to call it.
167 protocol::SecretFetchedCallback pin_callback_; 164 protocol::SecretFetchedCallback pin_callback_;
168 165
169 // Indicates whether to establish a new pairing with this host. This is 166 // Indicates whether to establish a new pairing with this host. This is
170 // modified in ProvideSecret(), but thereafter to be used only from the 167 // modified in ProvideSecret(), but thereafter to be used only from the
171 // network thread. (This is safe because ProvideSecret() is invoked at most 168 // network thread. (This is safe because ProvideSecret() is invoked at most
172 // once per run, and always before any reference to this flag.) 169 // once per run, and always before any reference to this flag.)
173 bool create_pairing_; 170 bool create_pairing_;
174 171
175 // The device name to appear in the paired-clients list. Accessed on the 172 // The device name to appear in the paired-clients list. Accessed on the
176 // network thread. 173 // network thread.
177 std::string device_name_; 174 std::string device_name_;
178 175
179 // If this is true, performance statistics will be periodically written to 176 // If this is true, performance statistics will be periodically written to
180 // the Android log. Used on the network thread. 177 // the Android log. Used on the network thread.
181 bool stats_logging_enabled_; 178 bool stats_logging_enabled_;
182 179
183 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; 180 friend class base::RefCountedThreadSafe<ChromotingJniInstance>;
184 181
185 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 182 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
186 }; 183 };
187 184
188 } // namespace remoting 185 } // namespace remoting
189 186
190 #endif 187 #endif
OLDNEW
« no previous file with comments | « no previous file | remoting/client/jni/chromoting_jni_instance.cc » ('j') | remoting/host/log_to_server_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698