| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <vector> |
| 10 | 11 |
| 11 #include "ash/accelerators/magnifier_key_scroller.h" | 12 #include "ash/accelerators/magnifier_key_scroller.h" |
| 12 #include "ash/accelerators/spoken_feedback_toggler.h" | 13 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 13 #include "ash/accessibility_delegate.h" | 14 #include "ash/accessibility_delegate.h" |
| 14 #include "ash/accessibility_types.h" | 15 #include "ash/accessibility_types.h" |
| 15 #include "ash/content/gpu_support_impl.h" | 16 #include "ash/content/gpu_support_impl.h" |
| 16 #include "ash/shell.h" | 17 #include "ash/shell.h" |
| 17 #include "ash/wallpaper/wallpaper_delegate.h" | 18 #include "ash/wallpaper/wallpaper_delegate.h" |
| 18 #include "ash/wm/mru_window_tracker.h" | 19 #include "ash/wm/mru_window_tracker.h" |
| 19 #include "ash/wm/window_state.h" | 20 #include "ash/wm/window_state.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/profiles/profile_manager.h" | 42 #include "chrome/browser/profiles/profile_manager.h" |
| 42 #include "chrome/browser/profiles/profiles_state.h" | 43 #include "chrome/browser/profiles/profiles_state.h" |
| 43 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" | 44 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" |
| 44 #include "chrome/browser/speech/tts_controller.h" | 45 #include "chrome/browser/speech/tts_controller.h" |
| 45 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" | 46 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" |
| 46 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" | 47 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" |
| 47 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 48 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 48 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" | 49 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" |
| 49 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 50 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 50 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h" | 51 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h" |
| 51 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" | |
| 52 #include "chrome/browser/ui/ash/session_util.h" | 52 #include "chrome/browser/ui/ash/session_util.h" |
| 53 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 53 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 54 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 54 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 55 #include "chrome/browser/ui/browser.h" | 55 #include "chrome/browser/ui/browser.h" |
| 56 #include "chrome/browser/ui/browser_commands.h" | 56 #include "chrome/browser/ui/browser_commands.h" |
| 57 #include "chrome/browser/ui/browser_finder.h" | 57 #include "chrome/browser/ui/browser_finder.h" |
| 58 #include "chrome/browser/ui/browser_navigator.h" | 58 #include "chrome/browser/ui/browser_navigator.h" |
| 59 #include "chrome/browser/ui/browser_navigator_params.h" | 59 #include "chrome/browser/ui/browser_navigator_params.h" |
| 60 #include "chrome/browser/ui/browser_tabstrip.h" | 60 #include "chrome/browser/ui/browser_tabstrip.h" |
| 61 #include "chrome/browser/ui/browser_window.h" | 61 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 585 } |
| 586 | 586 |
| 587 void ChromeShellDelegate::ToggleTouchpad() { | 587 void ChromeShellDelegate::ToggleTouchpad() { |
| 588 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); | 588 chromeos::system::InputDeviceSettings::Get()->ToggleTouchpad(); |
| 589 } | 589 } |
| 590 | 590 |
| 591 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { | 591 keyboard::KeyboardUI* ChromeShellDelegate::CreateKeyboardUI() { |
| 592 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); | 592 return new ChromeKeyboardUI(ProfileManager::GetActiveUserProfile()); |
| 593 } | 593 } |
| 594 | 594 |
| 595 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | |
| 596 return new SessionStateDelegateChromeos; | |
| 597 } | |
| 598 | |
| 599 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { | 595 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { |
| 600 return new AccessibilityDelegateImpl; | 596 return new AccessibilityDelegateImpl; |
| 601 } | 597 } |
| 602 | 598 |
| 603 std::unique_ptr<ash::PaletteDelegate> | 599 std::unique_ptr<ash::PaletteDelegate> |
| 604 ChromeShellDelegate::CreatePaletteDelegate() { | 600 ChromeShellDelegate::CreatePaletteDelegate() { |
| 605 return base::MakeUnique<chromeos::PaletteDelegateChromeOS>(); | 601 return base::MakeUnique<chromeos::PaletteDelegateChromeOS>(); |
| 606 } | 602 } |
| 607 | 603 |
| 608 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { | 604 ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 NOTREACHED() << "Unexpected notification " << type; | 639 NOTREACHED() << "Unexpected notification " << type; |
| 644 } | 640 } |
| 645 } | 641 } |
| 646 | 642 |
| 647 void ChromeShellDelegate::PlatformInit() { | 643 void ChromeShellDelegate::PlatformInit() { |
| 648 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 644 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 649 content::NotificationService::AllSources()); | 645 content::NotificationService::AllSources()); |
| 650 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 646 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 651 content::NotificationService::AllSources()); | 647 content::NotificationService::AllSources()); |
| 652 } | 648 } |
| OLD | NEW |