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

Unified Diff: ash/shell.cc

Issue 139053003: Chrome OS: avoid suspending on lid close when casting is active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and add unit test. Created 6 years, 11 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 | « no previous file | chromeos/DEPS » ('j') | chromeos/DEPS » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 532da3e7fd56a71f1e7faec89a07a28f571bab13..6375c8e30c7b92f50314a57c4f01ae8cc19cb867 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -583,6 +583,9 @@ Shell::Shell(ShellDelegate* delegate)
// We can't do this with a root window listener because XI_HierarchyChanged
// messages don't have a target window.
base::MessagePumpX11::Current()->AddObserver(output_configurator());
+
+ MediaCaptureDevicesDispatcher::GetInstance()->AddObserver(
+ output_configurator());
#endif // defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS)
@@ -710,6 +713,8 @@ Shell::~Shell() {
base::MessagePumpX11::Current()->RemoveDispatcherForRootWindow(
output_configurator());
base::MessagePumpX11::Current()->RemoveObserver(output_configurator());
+ MediaCaptureDevicesDispatcher::GetInstance()->RemoveObserver(
+ output_configurator());
display_change_observer_.reset();
#endif // defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | chromeos/DEPS » ('j') | chromeos/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698