diff options
author | flackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 05:18:25 +0000 |
---|---|---|
committer | flackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 05:18:25 +0000 |
commit | 0e3e7cbbea37a6303ddae4f7524968be622dca70 (patch) | |
tree | d0384948596c7284f1c82767f2849049d33281c7 /ash/high_contrast/high_contrast_controller.cc | |
parent | fda0eec93a1819e8662619a32ccb8e52e8666e39 (diff) | |
download | chromium_src-0e3e7cbbea37a6303ddae4f7524968be622dca70.zip chromium_src-0e3e7cbbea37a6303ddae4f7524968be622dca70.tar.gz chromium_src-0e3e7cbbea37a6303ddae4f7524968be622dca70.tar.bz2 |
Block keyboard and mouse input when maximize mode is activated by accelerometer.
BUG=353409
TEST=MaximizeModeControllerTest.BlocksKeyboardAndMouse
Review URL: https://codereview.chromium.org/230613004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/high_contrast/high_contrast_controller.cc')
-rw-r--r-- | ash/high_contrast/high_contrast_controller.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ash/high_contrast/high_contrast_controller.cc b/ash/high_contrast/high_contrast_controller.cc index 03618c56..418dd71 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 |