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

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: rebase @170134 Created 8 years 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); 87 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
88 #if defined(OS_CHROMEOS) 88 #if defined(OS_CHROMEOS)
89 shell->accelerator_controller()->SetBrightnessControlDelegate( 89 shell->accelerator_controller()->SetBrightnessControlDelegate(
90 scoped_ptr<ash::BrightnessControlDelegate>( 90 scoped_ptr<ash::BrightnessControlDelegate>(
91 new BrightnessController).Pass()); 91 new BrightnessController).Pass());
92 shell->accelerator_controller()->SetImeControlDelegate( 92 shell->accelerator_controller()->SetImeControlDelegate(
93 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); 93 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
94 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled( 94 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(
95 chromeos::accessibility::IsHighContrastEnabled()); 95 chromeos::accessibility::IsHighContrastEnabled());
96 96
97 chromeos::accessibility::ScreenMagnifierType magnifier_type = 97 ash::MagnifierType magnifier_type =
98 chromeos::accessibility::GetScreenMagnifierType(); 98 chromeos::accessibility::GetMagnifierType();
99 ash::Shell::GetInstance()->magnification_controller()->SetEnabled( 99 ash::Shell::GetInstance()->magnification_controller()->SetEnabled(
100 magnifier_type == chromeos::accessibility::MAGNIFIER_FULL); 100 magnifier_type == ash::MAGNIFIER_FULL);
101 ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled( 101 ash::Shell::GetInstance()->partial_magnification_controller()->SetEnabled(
102 magnifier_type == chromeos::accessibility::MAGNIFIER_PARTIAL); 102 magnifier_type == ash::MAGNIFIER_PARTIAL);
103 103
104 if (!CommandLine::ForCurrentProcess()->HasSwitch( 104 if (!CommandLine::ForCurrentProcess()->HasSwitch(
105 switches::kDisableZeroBrowsersOpenForTests)) { 105 switches::kDisableZeroBrowsersOpenForTests)) {
106 browser::StartKeepAlive(); 106 browser::StartKeepAlive();
107 } 107 }
108 #endif 108 #endif
109 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); 109 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
110 } 110 }
111 111
112 void CloseAsh() { 112 void CloseAsh() {
113 if (ash::Shell::HasInstance()) 113 if (ash::Shell::HasInstance())
114 ash::Shell::DeleteInstance(); 114 ash::Shell::DeleteInstance();
115 } 115 }
116 116
117 } // namespace chrome 117 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698