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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.h

Issue 2839043004: chromeos: Refactor ash SystemTrayDelegate enterprise methods to mojo (Closed)
Patch Set: review comments Created 3 years, 7 months 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 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" 15 #include "ash/system/tray/ime_info.h"
16 #include "ash/system/tray/system_tray_delegate.h" 16 #include "ash/system/tray/system_tray_delegate.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 19 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
20 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/ui/browser_list_observer.h" 21 #include "chrome/browser/ui/browser_list_observer.h"
22 #include "components/policy/core/common/cloud/cloud_policy_store.h"
23 #include "components/prefs/pref_change_registrar.h" 22 #include "components/prefs/pref_change_registrar.h"
24 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
25 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
26 #include "extensions/browser/app_window/app_window_registry.h" 25 #include "extensions/browser/app_window/app_window_registry.h"
27 #include "ui/base/ime/chromeos/ime_keyboard.h" 26 #include "ui/base/ime/chromeos/ime_keyboard.h"
28 #include "ui/base/ime/chromeos/input_method_manager.h" 27 #include "ui/base/ime/chromeos/input_method_manager.h"
29 #include "ui/chromeos/ime/input_method_menu_manager.h" 28 #include "ui/chromeos/ime/input_method_menu_manager.h"
30 29
31 namespace ash { 30 namespace ash {
32 class SystemTrayNotifier; 31 class SystemTrayNotifier;
33 } 32 }
34 33
35 namespace chromeos { 34 namespace chromeos {
36 35
37 class SystemTrayDelegateChromeOS 36 class SystemTrayDelegateChromeOS
38 : public ui::ime::InputMethodMenuManager::Observer, 37 : public ui::ime::InputMethodMenuManager::Observer,
39 public ash::SystemTrayDelegate, 38 public ash::SystemTrayDelegate,
40 public content::NotificationObserver, 39 public content::NotificationObserver,
41 public input_method::InputMethodManager::Observer, 40 public input_method::InputMethodManager::Observer,
42 public policy::CloudPolicyStore::Observer,
43 public chrome::BrowserListObserver, 41 public chrome::BrowserListObserver,
44 public extensions::AppWindowRegistry::Observer, 42 public extensions::AppWindowRegistry::Observer,
45 public input_method::InputMethodManager::ImeMenuObserver { 43 public input_method::InputMethodManager::ImeMenuObserver {
46 public: 44 public:
47 SystemTrayDelegateChromeOS(); 45 SystemTrayDelegateChromeOS();
48 ~SystemTrayDelegateChromeOS() override; 46 ~SystemTrayDelegateChromeOS() override;
49 47
50 // Overridden from ash::SystemTrayDelegate: 48 // Overridden from ash::SystemTrayDelegate:
51 void Initialize() override; 49 void Initialize() override;
52 ash::LoginStatus GetUserLoginStatus() const override; 50 ash::LoginStatus GetUserLoginStatus() const override;
53 std::string GetEnterpriseDomain() const override;
54 base::string16 GetEnterpriseMessage() const override;
55 void ShowEnterpriseInfo() override;
56 void ShowUserLogin() override; 51 void ShowUserLogin() override;
57 void GetCurrentIME(ash::IMEInfo* info) override; 52 void GetCurrentIME(ash::IMEInfo* info) override;
58 void GetAvailableIMEList(ash::IMEInfoList* list) override; 53 void GetAvailableIMEList(ash::IMEInfoList* list) override;
59 void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) override; 54 void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) override;
60 base::string16 GetIMEManagedMessage() override; 55 base::string16 GetIMEManagedMessage() override;
61 void SwitchIME(const std::string& ime_id) override; 56 void SwitchIME(const std::string& ime_id) override;
62 void ActivateIMEProperty(const std::string& key) override; 57 void ActivateIMEProperty(const std::string& key) override;
63 ash::NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override; 58 ash::NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override;
64 bool GetSessionStartTime(base::TimeTicks* session_start_time) override; 59 bool GetSessionStartTime(base::TimeTicks* session_start_time) override;
65 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; 60 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 98
104 // Overridden from InputMethodManager::Observer. 99 // Overridden from InputMethodManager::Observer.
105 void InputMethodChanged(input_method::InputMethodManager* manager, 100 void InputMethodChanged(input_method::InputMethodManager* manager,
106 Profile* profile, 101 Profile* profile,
107 bool show_message) override; 102 bool show_message) override;
108 103
109 // Overridden from InputMethodMenuManager::Observer. 104 // Overridden from InputMethodMenuManager::Observer.
110 void InputMethodMenuItemChanged( 105 void InputMethodMenuItemChanged(
111 ui::ime::InputMethodMenuManager* manager) override; 106 ui::ime::InputMethodMenuManager* manager) override;
112 107
113 void UpdateEnterpriseDomain();
114
115 // Overridden from CloudPolicyStore::Observer
116 void OnStoreLoaded(policy::CloudPolicyStore* store) override;
117 void OnStoreError(policy::CloudPolicyStore* store) override;
118
119 // Overridden from chrome::BrowserListObserver: 108 // Overridden from chrome::BrowserListObserver:
120 void OnBrowserRemoved(Browser* browser) override; 109 void OnBrowserRemoved(Browser* browser) override;
121 110
122 // Overridden from extensions::AppWindowRegistry::Observer: 111 // Overridden from extensions::AppWindowRegistry::Observer:
123 void OnAppWindowRemoved(extensions::AppWindow* app_window) override; 112 void OnAppWindowRemoved(extensions::AppWindow* app_window) override;
124 113
125 void OnAccessibilityStatusChanged( 114 void OnAccessibilityStatusChanged(
126 const AccessibilityStatusEventDetails& details); 115 const AccessibilityStatusEventDetails& details);
127 116
128 // input_method::InputMethodManager::ImeMenuObserver: 117 // input_method::InputMethodManager::ImeMenuObserver:
129 void ImeMenuActivationChanged(bool is_active) override; 118 void ImeMenuActivationChanged(bool is_active) override;
130 void ImeMenuListChanged() override; 119 void ImeMenuListChanged() override;
131 void ImeMenuItemsChanged( 120 void ImeMenuItemsChanged(
132 const std::string& engine_id, 121 const std::string& engine_id,
133 const std::vector<input_method::InputMethodManager::MenuItem>& items) 122 const std::vector<input_method::InputMethodManager::MenuItem>& items)
134 override; 123 override;
135 124
136 std::unique_ptr<content::NotificationRegistrar> registrar_; 125 std::unique_ptr<content::NotificationRegistrar> registrar_;
137 std::unique_ptr<PrefChangeRegistrar> local_state_registrar_; 126 std::unique_ptr<PrefChangeRegistrar> local_state_registrar_;
138 std::unique_ptr<PrefChangeRegistrar> user_pref_registrar_; 127 std::unique_ptr<PrefChangeRegistrar> user_pref_registrar_;
139 Profile* user_profile_ = nullptr; 128 Profile* user_profile_ = nullptr;
140 int search_key_mapped_to_ = input_method::kSearchKey; 129 int search_key_mapped_to_ = input_method::kSearchKey;
141 bool have_session_start_time_ = false; 130 bool have_session_start_time_ = false;
142 base::TimeTicks session_start_time_; 131 base::TimeTicks session_start_time_;
143 bool have_session_length_limit_ = false; 132 bool have_session_length_limit_ = false;
144 base::TimeDelta session_length_limit_; 133 base::TimeDelta session_length_limit_;
145 std::string enterprise_domain_;
146 bool is_active_directory_managed_ = false;
147 bool session_started_ = false; 134 bool session_started_ = false;
148 135
149 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_; 136 std::unique_ptr<ash::NetworkingConfigDelegate> networking_config_delegate_;
150 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 137 std::unique_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
151 138
152 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 139 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
153 }; 140 };
154 141
155 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 142 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
156 143
157 } // namespace chromeos 144 } // namespace chromeos
158 145
159 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 146 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_client_browsertest.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698