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

Unified Diff: remoting/host/remoting_me2me_host.cc

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, 5 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
« no previous file with comments | « remoting/host/host_power_save_blocker_unittest.cc ('k') | remoting/remoting_host.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index dd5e5fc8af3822341a54e20f43afcc882367729c..3c1d98630d0be81e278602d82b08d6f92ad848ba 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -61,6 +61,7 @@
#include "remoting/host/host_event_logger.h"
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/host_main.h"
+#include "remoting/host/host_power_save_blocker.h"
#include "remoting/host/host_status_logger.h"
#include "remoting/host/input_injector.h"
#include "remoting/host/ipc_desktop_environment.h"
@@ -401,6 +402,7 @@ class HostProcess : public ConfigWatcher::Delegate,
host_change_notification_listener_;
std::unique_ptr<HostStatusLogger> host_status_logger_;
std::unique_ptr<HostEventLogger> host_event_logger_;
+ std::unique_ptr<HostPowerSaveBlocker> power_save_blocker_;
std::unique_ptr<ChromotingHost> host_;
@@ -1472,6 +1474,11 @@ void HostProcess::StartHost() {
host_->AsWeakPtr(), ServerLogEntry::ME2ME,
signal_strategy_.get(), directory_bot_jid_));
+ power_save_blocker_.reset(new HostPowerSaveBlocker(
+ host_->AsWeakPtr(),
+ context_->ui_task_runner(),
+ context_->file_task_runner()));
+
// Set up reporting the host status notifications.
#if defined(REMOTING_MULTI_PROCESS)
host_event_logger_.reset(
@@ -1535,6 +1542,7 @@ void HostProcess::GoOffline(const std::string& host_offline_reason) {
host_.reset();
host_event_logger_.reset();
host_status_logger_.reset();
+ power_save_blocker_.reset();
host_change_notification_listener_.reset();
// Before shutting down HostSignalingManager, send the |host_offline_reason|
« no previous file with comments | « remoting/host/host_power_save_blocker_unittest.cc ('k') | remoting/remoting_host.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698