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

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

Issue 2080723008: [Chromoting] Use device::PowerSaveBlocker to block screen saver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
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 "device/power_save_blocker/power_save_blocker.h"
20 #include "remoting/host/chromoting_host_context.h"
19 #include "remoting/host/client_session_control.h" 21 #include "remoting/host/client_session_control.h"
20 #include "remoting/host/host_extension_session_manager.h" 22 #include "remoting/host/host_extension_session_manager.h"
21 #include "remoting/host/remote_input_filter.h" 23 #include "remoting/host/remote_input_filter.h"
22 #include "remoting/protocol/clipboard_echo_filter.h" 24 #include "remoting/protocol/clipboard_echo_filter.h"
23 #include "remoting/protocol/clipboard_filter.h" 25 #include "remoting/protocol/clipboard_filter.h"
24 #include "remoting/protocol/clipboard_stub.h" 26 #include "remoting/protocol/clipboard_stub.h"
25 #include "remoting/protocol/connection_to_client.h" 27 #include "remoting/protocol/connection_to_client.h"
26 #include "remoting/protocol/host_stub.h" 28 #include "remoting/protocol/host_stub.h"
27 #include "remoting/protocol/input_event_tracker.h" 29 #include "remoting/protocol/input_event_tracker.h"
28 #include "remoting/protocol/input_filter.h" 30 #include "remoting/protocol/input_filter.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 ClientSession* client, 85 ClientSession* client,
84 const std::string& channel_name, 86 const std::string& channel_name,
85 const protocol::TransportRoute& route) = 0; 87 const protocol::TransportRoute& route) = 0;
86 88
87 protected: 89 protected:
88 virtual ~EventHandler() {} 90 virtual ~EventHandler() {}
89 }; 91 };
90 92
91 // |event_handler| and |desktop_environment_factory| must outlive |this|. 93 // |event_handler| and |desktop_environment_factory| must outlive |this|.
92 // All |HostExtension|s in |extensions| must outlive |this|. 94 // All |HostExtension|s in |extensions| must outlive |this|.
93 ClientSession(EventHandler* event_handler, 95 ClientSession(const ChromotingHostContext& context,
94 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 96 EventHandler* event_handler,
95 std::unique_ptr<protocol::ConnectionToClient> connection, 97 std::unique_ptr<protocol::ConnectionToClient> connection,
96 DesktopEnvironmentFactory* desktop_environment_factory, 98 DesktopEnvironmentFactory* desktop_environment_factory,
97 const base::TimeDelta& max_duration, 99 const base::TimeDelta& max_duration,
98 scoped_refptr<protocol::PairingRegistry> pairing_registry, 100 scoped_refptr<protocol::PairingRegistry> pairing_registry,
99 const std::vector<HostExtension*>& extensions); 101 const std::vector<HostExtension*>& extensions);
100 ~ClientSession() override; 102 ~ClientSession() override;
101 103
102 // Returns the set of capabilities negotiated between client and host. 104 // Returns the set of capabilities negotiated between client and host.
103 const std::string& capabilities() const { return capabilities_; } 105 const std::string& capabilities() const { return capabilities_; }
104 106
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 239
238 // Used to store video channel pause & lossless parameters. 240 // Used to store video channel pause & lossless parameters.
239 bool pause_video_ = false; 241 bool pause_video_ = false;
240 bool lossless_video_encode_ = false; 242 bool lossless_video_encode_ = false;
241 bool lossless_video_color_ = false; 243 bool lossless_video_color_ = false;
242 244
243 // VideoLayout is sent only after the control channel is connected. Until 245 // VideoLayout is sent only after the control channel is connected. Until
244 // then it's stored in |pending_video_layout_message_|. 246 // then it's stored in |pending_video_layout_message_|.
245 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_; 247 std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_;
246 248
249 device::PowerSaveBlocker power_save_blocker_;
250
247 // Used to disable callbacks to |this| once DisconnectSession() has been 251 // Used to disable callbacks to |this| once DisconnectSession() has been
248 // called. 252 // called.
249 base::WeakPtrFactory<ClientSessionControl> weak_factory_; 253 base::WeakPtrFactory<ClientSessionControl> weak_factory_;
250 254
251 DISALLOW_COPY_AND_ASSIGN(ClientSession); 255 DISALLOW_COPY_AND_ASSIGN(ClientSession);
252 }; 256 };
253 257
254 } // namespace remoting 258 } // namespace remoting
255 259
256 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 260 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698