Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/wm/stacking_controller.h" | 9 #include "ash/wm/stacking_controller.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 319 } | 319 } |
| 320 | 320 |
| 321 bool ChromeShellDelegate::IsSpokenFeedbackEnabled() const { | 321 bool ChromeShellDelegate::IsSpokenFeedbackEnabled() const { |
| 322 #if defined(OS_CHROMEOS) | 322 #if defined(OS_CHROMEOS) |
| 323 return chromeos::accessibility::IsSpokenFeedbackEnabled(); | 323 return chromeos::accessibility::IsSpokenFeedbackEnabled(); |
| 324 #else | 324 #else |
| 325 return false; | 325 return false; |
| 326 #endif | 326 #endif |
| 327 } | 327 } |
| 328 | 328 |
| 329 bool ChromeShellDelegate::IsHighContrastEnabled() const { | |
| 330 #if defined(OS_CHROMEOS) | |
| 331 return chromeos::accessibility::IsHighContrastEnabled(); | |
| 332 #else | |
| 333 return false; | |
| 334 #endif | |
| 335 } | |
| 336 | |
| 337 void ChromeShellDelegate::ToggleHighContrast() { | |
| 338 #if defined(OS_CHROMEOS) | |
| 339 bool enabled = chromeos::accessibility::IsHighContrastEnabled(); | |
| 340 chromeos::accessibility::EnableHighContrast(!enabled); | |
| 341 #endif | |
| 342 } | |
| 343 | |
| 344 ash::ScreenMagnifierType ChromeShellDelegate::GetScreenMagnifierType() const { | |
| 345 #if defined(OS_CHROMEOS) | |
| 346 return chromeos::accessibility::GetScreenMagnifierType(); | |
| 347 #else | |
| 348 return false; | |
|
Zachary Kuznia
2012/11/21 08:07:12
return ash::MAGNIFIER_NONE
yoshiki
2012/11/21 14:48:04
Done.
| |
| 349 #endif | |
| 350 } | |
| 351 | |
| 352 void ChromeShellDelegate::SetScreenMagnifier(ash::ScreenMagnifierType type) { | |
| 353 #if defined(OS_CHROMEOS) | |
| 354 chromeos::accessibility::SetScreenMagnifier(type); | |
| 355 #endif | |
| 356 } | |
| 357 | |
| 358 bool ChromeShellDelegate::AlwaysShowAccessibilityMenu() const { | |
| 359 #if defined(OS_CHROMEOS) | |
| 360 // TODO(yoshiki): Add the checkbox on chrome://settings. crbug.com/158287 | |
| 361 return false; | |
| 362 #else | |
| 363 return false; | |
| 364 #endif | |
| 365 } | |
| 366 | |
| 329 app_list::AppListViewDelegate* | 367 app_list::AppListViewDelegate* |
| 330 ChromeShellDelegate::CreateAppListViewDelegate() { | 368 ChromeShellDelegate::CreateAppListViewDelegate() { |
| 331 DCHECK(ash::Shell::HasInstance()); | 369 DCHECK(ash::Shell::HasInstance()); |
| 332 // Shell will own the created delegate, and the delegate will own | 370 // Shell will own the created delegate, and the delegate will own |
| 333 // the controller. | 371 // the controller. |
| 334 return new AppListViewDelegate(new AppListControllerDelegateAsh()); | 372 return new AppListViewDelegate(new AppListControllerDelegateAsh()); |
| 335 } | 373 } |
| 336 | 374 |
| 337 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( | 375 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( |
| 338 ash::LauncherModel* model) { | 376 ash::LauncherModel* model) { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 488 ash::Shell::GetInstance()->ShowLauncher(); | 526 ash::Shell::GetInstance()->ShowLauncher(); |
| 489 break; | 527 break; |
| 490 default: | 528 default: |
| 491 NOTREACHED() << "Unexpected notification " << type; | 529 NOTREACHED() << "Unexpected notification " << type; |
| 492 } | 530 } |
| 493 #else | 531 #else |
| 494 // MSVC++ warns about switch statements without any cases. | 532 // MSVC++ warns about switch statements without any cases. |
| 495 NOTREACHED() << "Unexpected notification " << type; | 533 NOTREACHED() << "Unexpected notification " << type; |
| 496 #endif | 534 #endif |
| 497 } | 535 } |
| OLD | NEW |