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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; | 112 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; |
113 | 113 |
114 // ClipboardStub implementation. | 114 // ClipboardStub implementation. |
115 void SetCursorShape(const protocol::CursorShapeInfo& shape) override; | 115 void SetCursorShape(const protocol::CursorShapeInfo& shape) override; |
116 | 116 |
117 private: | 117 private: |
118 // This object is ref-counted, so it cleans itself up. | 118 // This object is ref-counted, so it cleans itself up. |
119 ~ChromotingJniInstance() override; | 119 ~ChromotingJniInstance() override; |
120 | 120 |
121 void ConnectToHostOnDisplayThread(); | 121 void ConnectToHostOnDisplayThread(); |
122 void ConnectToHostOnNetworkThread(); | 122 void ConnectToHostOnNetworkThread( |
| 123 scoped_ptr<FrameConsumerProxy> frame_consumer); |
123 void DisconnectFromHostOnNetworkThread(); | 124 void DisconnectFromHostOnNetworkThread(); |
124 | 125 |
125 // Notifies the user interface that the user needs to enter a PIN. The | 126 // Notifies the user interface that the user needs to enter a PIN. The |
126 // current authentication attempt is put on hold until |callback| is invoked. | 127 // current authentication attempt is put on hold until |callback| is invoked. |
127 // May be called on any thread. | 128 // May be called on any thread. |
128 void FetchSecret(bool pairable, | 129 void FetchSecret(bool pairable, |
129 const protocol::SecretFetchedCallback& callback); | 130 const protocol::SecretFetchedCallback& callback); |
130 | 131 |
131 // Sets the device name. Can be called on any thread. | 132 // Sets the device name. Can be called on any thread. |
132 void SetDeviceName(const std::string& device_name); | 133 void SetDeviceName(const std::string& device_name); |
(...skipping 10 matching lines...) Expand all Loading... |
143 void LogPerfStats(); | 144 void LogPerfStats(); |
144 | 145 |
145 // Used to obtain task runner references and make calls to Java methods. | 146 // Used to obtain task runner references and make calls to Java methods. |
146 ChromotingJniRuntime* jni_runtime_; | 147 ChromotingJniRuntime* jni_runtime_; |
147 | 148 |
148 // ID of the host we are connecting to. | 149 // ID of the host we are connecting to. |
149 std::string host_id_; | 150 std::string host_id_; |
150 std::string host_jid_; | 151 std::string host_jid_; |
151 | 152 |
152 // This group of variables is to be used on the display thread. | 153 // This group of variables is to be used on the display thread. |
153 scoped_refptr<FrameConsumerProxy> frame_consumer_; | |
154 scoped_ptr<JniFrameConsumer> view_; | 154 scoped_ptr<JniFrameConsumer> view_; |
155 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer> > view_weak_factory_; | 155 scoped_ptr<base::WeakPtrFactory<JniFrameConsumer>> view_weak_factory_; |
156 | 156 |
157 // This group of variables is to be used on the network thread. | 157 // This group of variables is to be used on the network thread. |
158 scoped_ptr<ClientContext> client_context_; | 158 scoped_ptr<ClientContext> client_context_; |
159 scoped_ptr<VideoRenderer> video_renderer_; | 159 scoped_ptr<VideoRenderer> video_renderer_; |
160 scoped_ptr<protocol::Authenticator> authenticator_; | 160 scoped_ptr<protocol::Authenticator> authenticator_; |
161 scoped_ptr<ChromotingClient> client_; | 161 scoped_ptr<ChromotingClient> client_; |
162 XmppSignalStrategy::XmppServerConfig xmpp_config_; | 162 XmppSignalStrategy::XmppServerConfig xmpp_config_; |
163 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ | 163 scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ |
164 scoped_ptr<ClientStatusLogger> client_status_logger_; | 164 scoped_ptr<ClientStatusLogger> client_status_logger_; |
165 base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_; | 165 base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_; |
(...skipping 24 matching lines...) Expand all Loading... |
190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 190 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
191 | 191 |
192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 192 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 194 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace remoting | 197 } // namespace remoting |
198 | 198 |
199 #endif | 199 #endif |
OLD | NEW |