| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "ash/accessibility_types.h" | 14 #include "ash/accessibility_types.h" |
| 15 #include "ash/system/tray/ime_info.h" | |
| 16 #include "ash/system/tray/system_tray_delegate.h" | 15 #include "ash/system/tray/system_tray_delegate.h" |
| 17 #include "base/macros.h" | 16 #include "base/macros.h" |
| 18 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 18 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/ui/browser_list_observer.h" | 20 #include "chrome/browser/ui/browser_list_observer.h" |
| 22 #include "components/prefs/pref_change_registrar.h" | 21 #include "components/prefs/pref_change_registrar.h" |
| 23 #include "content/public/browser/notification_observer.h" | 22 #include "content/public/browser/notification_observer.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 23 #include "content/public/browser/notification_registrar.h" |
| 25 #include "extensions/browser/app_window/app_window_registry.h" | 24 #include "extensions/browser/app_window/app_window_registry.h" |
| 26 #include "ui/base/ime/chromeos/ime_keyboard.h" | 25 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 27 #include "ui/base/ime/chromeos/input_method_manager.h" | 26 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 28 #include "ui/chromeos/ime/input_method_menu_manager.h" | 27 #include "ui/chromeos/ime/input_method_menu_manager.h" |
| 29 | 28 |
| 30 namespace ash { | 29 namespace ash { |
| 31 class SystemTrayNotifier; | 30 class SystemTrayNotifier; |
| 32 } | 31 } |
| 33 | 32 |
| 34 namespace chromeos { | 33 namespace chromeos { |
| 35 | 34 |
| 35 // TODO(jamescook): Move observation of IME state into ash. |
| 36 class SystemTrayDelegateChromeOS | 36 class SystemTrayDelegateChromeOS |
| 37 : public ui::ime::InputMethodMenuManager::Observer, | 37 : public ui::ime::InputMethodMenuManager::Observer, |
| 38 public ash::SystemTrayDelegate, | 38 public ash::SystemTrayDelegate, |
| 39 public content::NotificationObserver, | 39 public content::NotificationObserver, |
| 40 public input_method::InputMethodManager::Observer, | 40 public input_method::InputMethodManager::Observer, |
| 41 public chrome::BrowserListObserver, | 41 public chrome::BrowserListObserver, |
| 42 public extensions::AppWindowRegistry::Observer, | 42 public extensions::AppWindowRegistry::Observer, |
| 43 public input_method::InputMethodManager::ImeMenuObserver { | 43 public input_method::InputMethodManager::ImeMenuObserver { |
| 44 public: | 44 public: |
| 45 SystemTrayDelegateChromeOS(); | 45 SystemTrayDelegateChromeOS(); |
| 46 ~SystemTrayDelegateChromeOS() override; | 46 ~SystemTrayDelegateChromeOS() override; |
| 47 | 47 |
| 48 // Overridden from ash::SystemTrayDelegate: | 48 // Overridden from ash::SystemTrayDelegate: |
| 49 void Initialize() override; | 49 void Initialize() override; |
| 50 void ShowUserLogin() override; | 50 void ShowUserLogin() override; |
| 51 void GetCurrentIME(ash::IMEInfo* info) override; | |
| 52 void GetAvailableIMEList(ash::IMEInfoList* list) override; | |
| 53 void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) override; | |
| 54 ash::NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override; | 51 ash::NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override; |
| 55 bool GetSessionStartTime(base::TimeTicks* session_start_time) override; | 52 bool GetSessionStartTime(base::TimeTicks* session_start_time) override; |
| 56 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; | 53 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; |
| 57 void ActiveUserWasChanged() override; | 54 void ActiveUserWasChanged() override; |
| 58 bool IsSearchKeyMappedToCapsLock() override; | 55 bool IsSearchKeyMappedToCapsLock() override; |
| 59 | 56 |
| 60 private: | 57 private: |
| 61 ash::SystemTrayNotifier* GetSystemTrayNotifier(); | 58 ash::SystemTrayNotifier* GetSystemTrayNotifier(); |
| 62 | 59 |
| 63 void SetProfile(Profile* profile); | 60 void SetProfile(Profile* profile); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 128 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
| 132 | 129 |
| 133 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); | 130 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); |
| 134 }; | 131 }; |
| 135 | 132 |
| 136 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); | 133 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
| 137 | 134 |
| 138 } // namespace chromeos | 135 } // namespace chromeos |
| 139 | 136 |
| 140 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ | 137 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ |
| OLD | NEW |