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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.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/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/magnifier/magnifier_constants.h"
8 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/stacking_controller.h" 10 #include "ash/wm/stacking_controller.h"
10 #include "ash/wm/window_util.h" 11 #include "ash/wm/window_util.h"
11 #include "base/bind.h" 12 #include "base/bind.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "chrome/browser/chromeos/login/screen_locker.h" 14 #include "chrome/browser/chromeos/login/screen_locker.h"
14 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 15 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
15 #include "chrome/browser/lifetime/application_lifetime.h" 16 #include "chrome/browser/lifetime/application_lifetime.h"
16 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 334 }
334 335
335 bool ChromeShellDelegate::IsSpokenFeedbackEnabled() const { 336 bool ChromeShellDelegate::IsSpokenFeedbackEnabled() const {
336 #if defined(OS_CHROMEOS) 337 #if defined(OS_CHROMEOS)
337 return chromeos::accessibility::IsSpokenFeedbackEnabled(); 338 return chromeos::accessibility::IsSpokenFeedbackEnabled();
338 #else 339 #else
339 return false; 340 return false;
340 #endif 341 #endif
341 } 342 }
342 343
344 bool ChromeShellDelegate::IsHighContrastEnabled() const {
345 #if defined(OS_CHROMEOS)
346 return chromeos::accessibility::IsHighContrastEnabled();
347 #else
348 return false;
349 #endif
350 }
351
352 void ChromeShellDelegate::ToggleHighContrast() {
353 #if defined(OS_CHROMEOS)
354 bool enabled = chromeos::accessibility::IsHighContrastEnabled();
355 chromeos::accessibility::EnableHighContrast(!enabled);
356 #endif
357 }
358
359 ash::MagnifierType ChromeShellDelegate::GetMagnifierType() const {
360 #if defined(OS_CHROMEOS)
361 return chromeos::accessibility::GetMagnifierType();
362 #else
363 return ash::MAGNIFIER_OFF;
364 #endif
365 }
366
367 void ChromeShellDelegate::SetMagnifier(ash::MagnifierType type) {
368 #if defined(OS_CHROMEOS)
369 chromeos::accessibility::SetMagnifier(type);
370 #endif
371 }
372
373 bool ChromeShellDelegate::ShouldAlwaysShowAccessibilityMenu() const {
374 #if defined(OS_CHROMEOS)
375 // TODO(yoshiki): Add the checkbox on chrome://settings. crbug.com/158287
376 return false;
377 #else
378 return false;
379 #endif
380 }
381
343 app_list::AppListViewDelegate* 382 app_list::AppListViewDelegate*
344 ChromeShellDelegate::CreateAppListViewDelegate() { 383 ChromeShellDelegate::CreateAppListViewDelegate() {
345 DCHECK(ash::Shell::HasInstance()); 384 DCHECK(ash::Shell::HasInstance());
346 // Shell will own the created delegate, and the delegate will own 385 // Shell will own the created delegate, and the delegate will own
347 // the controller. 386 // the controller.
348 return new AppListViewDelegate(new AppListControllerDelegateAsh()); 387 return new AppListViewDelegate(new AppListControllerDelegateAsh());
349 } 388 }
350 389
351 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( 390 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate(
352 ash::LauncherModel* model) { 391 ash::LauncherModel* model) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 ash::Shell::GetInstance()->ShowLauncher(); 559 ash::Shell::GetInstance()->ShowLauncher();
521 break; 560 break;
522 default: 561 default:
523 NOTREACHED() << "Unexpected notification " << type; 562 NOTREACHED() << "Unexpected notification " << type;
524 } 563 }
525 #else 564 #else
526 // MSVC++ warns about switch statements without any cases. 565 // MSVC++ warns about switch statements without any cases.
527 NOTREACHED() << "Unexpected notification " << type; 566 NOTREACHED() << "Unexpected notification " << type;
528 #endif 567 #endif
529 } 568 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698