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_JNI_CHROMOTING_JNI_INSTANCE_H_ |
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "remoting/client/chromoting_client.h" | 15 #include "remoting/client/chromoting_client.h" |
16 #include "remoting/client/client_context.h" | 16 #include "remoting/client/client_context.h" |
17 #include "remoting/client/client_user_interface.h" | 17 #include "remoting/client/client_user_interface.h" |
18 #include "remoting/proto/control.pb.h" | 18 #include "remoting/proto/control.pb.h" |
19 #include "remoting/proto/event.pb.h" | 19 #include "remoting/proto/event.pb.h" |
20 #include "remoting/protocol/clipboard_stub.h" | 20 #include "remoting/protocol/clipboard_stub.h" |
21 #include "remoting/protocol/cursor_shape_stub.h" | 21 #include "remoting/protocol/cursor_shape_stub.h" |
22 #include "remoting/signaling/xmpp_signal_strategy.h" | 22 #include "remoting/signaling/xmpp_signal_strategy.h" |
23 | 23 |
24 namespace remoting { | 24 namespace remoting { |
25 | 25 |
26 namespace protocol { | 26 namespace protocol { |
27 class ClipboardEvent; | 27 class ClipboardEvent; |
28 class CursorShapeInfo; | 28 class CursorShapeInfo; |
29 class PerformanceTracker; | 29 class PerformanceTracker; |
30 class VideoRenderer; | 30 class VideoRenderer; |
31 } // namespace protocol | 31 } // namespace protocol |
32 | 32 |
| 33 class AudioPlayerAndroid; |
33 class ChromotingJniRuntime; | 34 class ChromotingJniRuntime; |
34 class JniClient; | 35 class JniClient; |
35 class JniDisplayHandler; | 36 class JniDisplayHandler; |
36 class JniFrameConsumer; | 37 class JniFrameConsumer; |
37 class JniPairingSecretFetcher; | 38 class JniPairingSecretFetcher; |
38 | 39 |
39 // ChromotingJniInstance is scoped to the session. | 40 // ChromotingJniInstance is scoped to the session. |
40 // This class is Created on the UI thread but thereafter it is used and | 41 // This class is Created on the UI thread but thereafter it is used and |
41 // destroyed on the network thread. Except where indicated, all methods are | 42 // destroyed on the network thread. Except where indicated, all methods are |
42 // called on the network thread. | 43 // called on the network thread. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // This group of variables is to be used on the network thread. | 173 // This group of variables is to be used on the network thread. |
173 std::unique_ptr<ClientContext> client_context_; | 174 std::unique_ptr<ClientContext> client_context_; |
174 std::unique_ptr<protocol::PerformanceTracker> perf_tracker_; | 175 std::unique_ptr<protocol::PerformanceTracker> perf_tracker_; |
175 std::unique_ptr<JniFrameConsumer> view_; | 176 std::unique_ptr<JniFrameConsumer> view_; |
176 std::unique_ptr<protocol::VideoRenderer> video_renderer_; | 177 std::unique_ptr<protocol::VideoRenderer> video_renderer_; |
177 std::unique_ptr<ChromotingClient> client_; | 178 std::unique_ptr<ChromotingClient> client_; |
178 XmppSignalStrategy::XmppServerConfig xmpp_config_; | 179 XmppSignalStrategy::XmppServerConfig xmpp_config_; |
179 std::unique_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ | 180 std::unique_ptr<XmppSignalStrategy> signaling_; // Must outlive client_ |
180 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; | 181 protocol::ThirdPartyTokenFetchedCallback third_party_token_fetched_callback_; |
181 | 182 |
| 183 std::unique_ptr<AudioPlayerAndroid> audio_player_; |
| 184 |
182 // Indicates whether to establish a new pairing with this host. This is | 185 // Indicates whether to establish a new pairing with this host. This is |
183 // modified in ProvideSecret(), but thereafter to be used only from the | 186 // modified in ProvideSecret(), but thereafter to be used only from the |
184 // network thread. (This is safe because ProvideSecret() is invoked at most | 187 // network thread. (This is safe because ProvideSecret() is invoked at most |
185 // once per run, and always before any reference to this flag.) | 188 // once per run, and always before any reference to this flag.) |
186 bool create_pairing_ = false; | 189 bool create_pairing_ = false; |
187 | 190 |
188 // The device name to appear in the paired-clients list. Accessed on the | 191 // The device name to appear in the paired-clients list. Accessed on the |
189 // network thread. | 192 // network thread. |
190 std::string device_name_; | 193 std::string device_name_; |
191 | 194 |
(...skipping 10 matching lines...) Expand all Loading... |
202 // thread. | 205 // thread. |
203 bool connected_ = false; | 206 bool connected_ = false; |
204 | 207 |
205 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 208 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
206 | 209 |
207 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 210 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
208 }; | 211 }; |
209 | 212 |
210 } // namespace remoting | 213 } // namespace remoting |
211 | 214 |
212 #endif | 215 #endif // REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ |
OLD | NEW |