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

Unified Diff: ash/high_contrast/high_contrast_controller.cc

Issue 230613004: Block keyboard and mouse input when maximize mode is activated by accelerometer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 8 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 | « ash/high_contrast/high_contrast_controller.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/high_contrast/high_contrast_controller.cc
diff --git a/ash/high_contrast/high_contrast_controller.cc b/ash/high_contrast/high_contrast_controller.cc
index 03618c56ba3c0be7c272c0c879c9bc77a12557fb..418dd7162c1768bcd4b66a478039e4d6611b8bee 100644
--- a/ash/high_contrast/high_contrast_controller.cc
+++ b/ash/high_contrast/high_contrast_controller.cc
@@ -12,6 +12,11 @@ namespace ash {
HighContrastController::HighContrastController()
: enabled_(false) {
+ Shell::GetInstance()->AddShellObserver(this);
+}
+
+HighContrastController::~HighContrastController() {
+ Shell::GetInstance()->RemoveShellObserver(this);
}
void HighContrastController::SetEnabled(bool enabled) {
@@ -25,12 +30,12 @@ void HighContrastController::SetEnabled(bool enabled) {
}
}
-void HighContrastController::OnRootWindowAdded(aura::Window* root_window) {
- UpdateDisplay(root_window);
-}
-
void HighContrastController::UpdateDisplay(aura::Window* root_window) {
root_window->layer()->SetLayerInverted(enabled_);
}
+void HighContrastController::OnRootWindowAdded(aura::Window* root_window) {
+ UpdateDisplay(root_window);
+}
+
} // namespace ash
« no previous file with comments | « ash/high_contrast/high_contrast_controller.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698