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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/client_session.h
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h
index 30551ba07708ff8580db3aa02fded8e29dabbf14..64304612109306718481555754ab4d78c0be184b 100644
--- a/remoting/host/client_session.h
+++ b/remoting/host/client_session.h
@@ -16,6 +16,8 @@
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
+#include "device/power_save_blocker/power_save_blocker.h"
+#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/client_session_control.h"
#include "remoting/host/host_extension_session_manager.h"
#include "remoting/host/remote_input_filter.h"
@@ -90,8 +92,8 @@ class ClientSession : public base::NonThreadSafe,
// |event_handler| and |desktop_environment_factory| must outlive |this|.
// All |HostExtension|s in |extensions| must outlive |this|.
- ClientSession(EventHandler* event_handler,
- scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ ClientSession(const ChromotingHostContext& context,
+ EventHandler* event_handler,
std::unique_ptr<protocol::ConnectionToClient> connection,
DesktopEnvironmentFactory* desktop_environment_factory,
const base::TimeDelta& max_duration,
@@ -244,6 +246,8 @@ class ClientSession : public base::NonThreadSafe,
// then it's stored in |pending_video_layout_message_|.
std::unique_ptr<protocol::VideoLayout> pending_video_layout_message_;
+ device::PowerSaveBlocker power_save_blocker_;
+
// Used to disable callbacks to |this| once DisconnectSession() has been
// called.
base::WeakPtrFactory<ClientSessionControl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698