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

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 11415025: A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/ash/ash_init.h" 5 #include "chrome/browser/ui/ash/ash_init.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/high_contrast/high_contrast_controller.h" 9 #include "ash/high_contrast/high_contrast_controller.h"
10 #include "ash/magnifier/magnification_controller.h" 10 #include "ash/magnifier/magnification_controller.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); 77 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
78 #if defined(OS_CHROMEOS) 78 #if defined(OS_CHROMEOS)
79 shell->accelerator_controller()->SetBrightnessControlDelegate( 79 shell->accelerator_controller()->SetBrightnessControlDelegate(
80 scoped_ptr<ash::BrightnessControlDelegate>( 80 scoped_ptr<ash::BrightnessControlDelegate>(
81 new BrightnessController).Pass()); 81 new BrightnessController).Pass());
82 shell->accelerator_controller()->SetImeControlDelegate( 82 shell->accelerator_controller()->SetImeControlDelegate(
83 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); 83 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
84 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled( 84 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(
85 chromeos::accessibility::IsHighContrastEnabled()); 85 chromeos::accessibility::IsHighContrastEnabled());
86 86
87 chromeos::accessibility::ScreenMagnifierType magnifier_type = 87 ash::ScreenMagnifierType magnifier_type =
88 chromeos::accessibility::GetScreenMagnifierType(); 88 chromeos::accessibility::GetScreenMagnifierType();
89 ash::Shell::GetInstance()->magnification_controller()->SetEnabled( 89 ash::Shell::GetInstance()->magnification_controller()->SetEnabled(
90 magnifier_type == chromeos::accessibility::MAGNIFIER_FULL); 90 magnifier_type == ash::MAGNIFIER_FULL);
91 ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled( 91 ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled(
92 magnifier_type == chromeos::accessibility::MAGNIFIER_PARTIAL); 92 magnifier_type == ash::MAGNIFIER_PARTIAL);
93 93
94 if (!CommandLine::ForCurrentProcess()->HasSwitch( 94 if (!CommandLine::ForCurrentProcess()->HasSwitch(
95 switches::kDisableZeroBrowsersOpenForTests)) { 95 switches::kDisableZeroBrowsersOpenForTests)) {
96 browser::StartKeepAlive(); 96 browser::StartKeepAlive();
97 } 97 }
98 #endif 98 #endif
99 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); 99 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
100 } 100 }
101 101
102 void CloseAsh() { 102 void CloseAsh() {
103 if (ash::Shell::HasInstance()) 103 if (ash::Shell::HasInstance())
104 ash::Shell::DeleteInstance(); 104 ash::Shell::DeleteInstance();
105 } 105 }
106 106
107 } // namespace chrome 107 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698