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

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

Issue 2858813002: [Chromoting] Use ProcessStatsSender in host process
Patch Set: Created 3 years, 7 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/base/constants.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/sequenced_task_runner_helpers.h" 15 #include "base/sequenced_task_runner_helpers.h"
16 #include "base/threading/non_thread_safe.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/current_process_stats_agent.h"
21 #include "remoting/host/desktop_environment_options.h" 22 #include "remoting/host/desktop_environment_options.h"
22 #include "remoting/host/host_experiment_session_plugin.h" 23 #include "remoting/host/host_experiment_session_plugin.h"
23 #include "remoting/host/host_extension_session_manager.h" 24 #include "remoting/host/host_extension_session_manager.h"
24 #include "remoting/host/remote_input_filter.h" 25 #include "remoting/host/remote_input_filter.h"
25 #include "remoting/protocol/clipboard_echo_filter.h" 26 #include "remoting/protocol/clipboard_echo_filter.h"
26 #include "remoting/protocol/clipboard_filter.h" 27 #include "remoting/protocol/clipboard_filter.h"
27 #include "remoting/protocol/clipboard_stub.h" 28 #include "remoting/protocol/clipboard_stub.h"
28 #include "remoting/protocol/connection_to_client.h" 29 #include "remoting/protocol/connection_to_client.h"
29 #include "remoting/protocol/host_stub.h" 30 #include "remoting/protocol/host_stub.h"
30 #include "remoting/protocol/input_event_tracker.h" 31 #include "remoting/protocol/input_event_tracker.h"
31 #include "remoting/protocol/input_filter.h" 32 #include "remoting/protocol/input_filter.h"
32 #include "remoting/protocol/input_stub.h" 33 #include "remoting/protocol/input_stub.h"
33 #include "remoting/protocol/mouse_input_filter.h" 34 #include "remoting/protocol/mouse_input_filter.h"
34 #include "remoting/protocol/pairing_registry.h" 35 #include "remoting/protocol/pairing_registry.h"
35 #include "remoting/protocol/video_stream.h" 36 #include "remoting/protocol/video_stream.h"
36 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 37 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
37 38
38 namespace remoting { 39 namespace remoting {
39 40
40 class AudioStream; 41 class AudioStream;
41 class DesktopEnvironment; 42 class DesktopEnvironment;
42 class DesktopEnvironmentFactory; 43 class DesktopEnvironmentFactory;
43 class InputInjector; 44 class InputInjector;
44 class MouseShapePump; 45 class MouseShapePump;
46 class ProcessStatsSender;
45 class ScreenControls; 47 class ScreenControls;
46 48
47 namespace protocol { 49 namespace protocol {
48 class VideoLayout; 50 class VideoLayout;
49 } // namespace protocol 51 } // namespace protocol
50 52
51 // A ClientSession keeps a reference to a connection to a client, and maintains 53 // A ClientSession keeps a reference to a connection to a client, and maintains
52 // per-client state. 54 // per-client state.
53 class ClientSession : public base::NonThreadSafe, 55 class ClientSession : public base::NonThreadSafe,
54 public protocol::HostStub, 56 public protocol::HostStub,
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 243
242 // VideoLayout is sent only after the control channel is connected. Until 244 // VideoLayout is sent only after the control channel is connected. Until
243 // then it's stored in |pending_video_layout_message_|. 245 // then it's stored in |pending_video_layout_message_|.
244 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_; 246 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_;
245 247
246 scoped_refptr<protocol::InputEventTimestampsSource> 248 scoped_refptr<protocol::InputEventTimestampsSource>
247 event_timestamp_source_for_tests_; 249 event_timestamp_source_for_tests_;
248 250
249 HostExperimentSessionPlugin host_experiment_session_plugin_; 251 HostExperimentSessionPlugin host_experiment_session_plugin_;
250 252
253 // Reports resource usage through ConnectionToClient.
254 std::unique_ptr<ProcessStatsSender> stats_sender_;
255
256 // Retrieves resource usage of current process.
257 CurrentProcessStatsAgent current_process_stats_agent_;
258
251 // Used to disable callbacks to |this| once DisconnectSession() has been 259 // Used to disable callbacks to |this| once DisconnectSession() has been
252 // called. 260 // called.
253 base::WeakPtrFactory<ClientSessionControl> weak_factory_; 261 base::WeakPtrFactory<ClientSessionControl> weak_factory_;
254 262
255 DISALLOW_COPY_AND_ASSIGN(ClientSession); 263 DISALLOW_COPY_AND_ASSIGN(ClientSession);
256 }; 264 };
257 265
258 } // namespace remoting 266 } // namespace remoting
259 267
260 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 268 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/base/constants.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698