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

Side by Side Diff: remoting/host/client_session.h

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_HOST_CLIENT_SESSION_H_ 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_ 6 #define REMOTING_HOST_CLIENT_SESSION_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/sequence_checker.h"
15 #include "base/sequenced_task_runner_helpers.h" 16 #include "base/sequenced_task_runner_helpers.h"
16 #include "base/threading/non_thread_safe.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 #include "remoting/host/client_session_control.h" 19 #include "remoting/host/client_session_control.h"
20 #include "remoting/host/client_session_details.h" 20 #include "remoting/host/client_session_details.h"
21 #include "remoting/host/desktop_environment_options.h" 21 #include "remoting/host/desktop_environment_options.h"
22 #include "remoting/host/host_experiment_session_plugin.h" 22 #include "remoting/host/host_experiment_session_plugin.h"
23 #include "remoting/host/host_extension_session_manager.h" 23 #include "remoting/host/host_extension_session_manager.h"
24 #include "remoting/host/remote_input_filter.h" 24 #include "remoting/host/remote_input_filter.h"
25 #include "remoting/protocol/clipboard_echo_filter.h" 25 #include "remoting/protocol/clipboard_echo_filter.h"
26 #include "remoting/protocol/clipboard_filter.h" 26 #include "remoting/protocol/clipboard_filter.h"
(...skipping 16 matching lines...) Expand all
43 class InputInjector; 43 class InputInjector;
44 class MouseShapePump; 44 class MouseShapePump;
45 class ScreenControls; 45 class ScreenControls;
46 46
47 namespace protocol { 47 namespace protocol {
48 class VideoLayout; 48 class VideoLayout;
49 } // namespace protocol 49 } // namespace protocol
50 50
51 // A ClientSession keeps a reference to a connection to a client, and maintains 51 // A ClientSession keeps a reference to a connection to a client, and maintains
52 // per-client state. 52 // per-client state.
53 class ClientSession : public base::NonThreadSafe, 53 class ClientSession : public protocol::HostStub,
54 public protocol::HostStub,
55 public protocol::ConnectionToClient::EventHandler, 54 public protocol::ConnectionToClient::EventHandler,
56 public protocol::VideoStream::Observer, 55 public protocol::VideoStream::Observer,
57 public ClientSessionControl, 56 public ClientSessionControl,
58 public ClientSessionDetails { 57 public ClientSessionDetails {
59 public: 58 public:
60 // Callback interface for passing events to the ChromotingHost. 59 // Callback interface for passing events to the ChromotingHost.
61 class EventHandler { 60 class EventHandler {
62 public: 61 public:
63 // Called after authentication has started. 62 // Called after authentication has started.
64 virtual void OnSessionAuthenticating(ClientSession* client) = 0; 63 virtual void OnSessionAuthenticating(ClientSession* client) = 0;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 240
242 // VideoLayout is sent only after the control channel is connected. Until 241 // VideoLayout is sent only after the control channel is connected. Until
243 // then it's stored in |pending_video_layout_message_|. 242 // then it's stored in |pending_video_layout_message_|.
244 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_; 243 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_;
245 244
246 scoped_refptr<protocol::InputEventTimestampsSource> 245 scoped_refptr<protocol::InputEventTimestampsSource>
247 event_timestamp_source_for_tests_; 246 event_timestamp_source_for_tests_;
248 247
249 HostExperimentSessionPlugin host_experiment_session_plugin_; 248 HostExperimentSessionPlugin host_experiment_session_plugin_;
250 249
250 SEQUENCE_CHECKER(sequence_checker_);
251
251 // Used to disable callbacks to |this| once DisconnectSession() has been 252 // Used to disable callbacks to |this| once DisconnectSession() has been
252 // called. 253 // called.
253 base::WeakPtrFactory<ClientSessionControl> weak_factory_; 254 base::WeakPtrFactory<ClientSessionControl> weak_factory_;
254 255
255 DISALLOW_COPY_AND_ASSIGN(ClientSession); 256 DISALLOW_COPY_AND_ASSIGN(ClientSession);
256 }; 257 };
257 258
258 } // namespace remoting 259 } // namespace remoting
259 260
260 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 261 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698