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

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: Add unittests for LogToServer Created 6 years, 5 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 11 matching lines...) Expand all
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 { 32 class ClientStatusLogger;
33 class LogToServer;
34 }
35
36 class VideoRenderer; 33 class VideoRenderer;
37 class TokenFetcherProxy; 34 class TokenFetcherProxy;
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:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_; 156 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_;
160 157
161 // This group of variables is to be used on the network thread. 158 // This group of variables is to be used on the network thread.
162 ClientConfig client_config_; 159 ClientConfig client_config_;
163 scoped_ptr<ClientContext> client_context_; 160 scoped_ptr<ClientContext> client_context_;
164 scoped_ptr<VideoRenderer> video_renderer_; 161 scoped_ptr<VideoRenderer> video_renderer_;
165 scoped_ptr<protocol::ConnectionToHost> connection_; 162 scoped_ptr<protocol::ConnectionToHost> connection_;
166 scoped_ptr<ChromotingClient> client_; 163 scoped_ptr<ChromotingClient> client_;
167 XmppSignalStrategy::XmppServerConfig xmpp_config_; 164 XmppSignalStrategy::XmppServerConfig xmpp_config_;
168 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ 165 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_
169 scoped_ptr<client::LogToServer> log_to_server_; 166 scoped_ptr<ClientStatusLogger> client_status_logger_;
170 base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_; 167 base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_;
171 168
172 // Pass this the user's PIN once we have it. To be assigned and accessed on 169 // Pass this the user's PIN once we have it. To be assigned and accessed on
173 // the UI thread, but must be posted to the network thread to call it. 170 // the UI thread, but must be posted to the network thread to call it.
174 protocol::SecretFetchedCallback pin_callback_; 171 protocol::SecretFetchedCallback pin_callback_;
175 172
176 // Indicates whether to establish a new pairing with this host. This is 173 // Indicates whether to establish a new pairing with this host. This is
177 // modified in ProvideSecret(), but thereafter to be used only from the 174 // modified in ProvideSecret(), but thereafter to be used only from the
178 // network thread. (This is safe because ProvideSecret() is invoked at most 175 // network thread. (This is safe because ProvideSecret() is invoked at most
179 // once per run, and always before any reference to this flag.) 176 // once per run, and always before any reference to this flag.)
(...skipping 10 matching lines...) Expand all
190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; 187 friend class base::RefCountedThreadSafe<ChromotingJniInstance>;
191 188
192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; 189 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
193 190
194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 191 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
195 }; 192 };
196 193
197 } // namespace remoting 194 } // namespace remoting
198 195
199 #endif 196 #endif
OLDNEW
« no previous file with comments | « remoting/client/client_status_logger_unittest.cc ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698