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

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

Issue 184953002: Migrate Chrome OS Bluetooth UI to the new discovery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by derat@ and keybuk@. Created 6 years, 9 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 | Annotate | Revision Log
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 "ash/ime/input_method_menu_manager.h" 8 #include "ash/ime/input_method_menu_manager.h"
9 #include "ash/session_state_observer.h" 9 #include "ash/session_state_observer.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 23 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
24 #include "chromeos/audio/cras_audio_handler.h" 24 #include "chromeos/audio/cras_audio_handler.h"
25 #include "chromeos/dbus/session_manager_client.h" 25 #include "chromeos/dbus/session_manager_client.h"
26 #include "chromeos/ime/input_method_manager.h" 26 #include "chromeos/ime/input_method_manager.h"
27 #include "chromeos/login/login_state.h" 27 #include "chromeos/login/login_state.h"
28 #include "components/policy/core/common/cloud/cloud_policy_store.h" 28 #include "components/policy/core/common/cloud/cloud_policy_store.h"
29 #include "content/public/browser/notification_observer.h" 29 #include "content/public/browser/notification_observer.h"
30 #include "content/public/browser/notification_registrar.h" 30 #include "content/public/browser/notification_registrar.h"
31 #include "device/bluetooth/bluetooth_adapter.h" 31 #include "device/bluetooth/bluetooth_adapter.h"
32 #include "device/bluetooth/bluetooth_discovery_session.h"
32 33
33 namespace chromeos { 34 namespace chromeos {
34 35
35 class SystemTrayDelegateChromeOS 36 class SystemTrayDelegateChromeOS
36 : public ash::ime::InputMethodMenuManager::Observer, 37 : public ash::ime::InputMethodMenuManager::Observer,
37 public ash::SystemTrayDelegate, 38 public ash::SystemTrayDelegate,
38 public SessionManagerClient::Observer, 39 public SessionManagerClient::Observer,
39 public drive::JobListObserver, 40 public drive::JobListObserver,
40 public content::NotificationObserver, 41 public content::NotificationObserver,
41 public input_method::InputMethodManager::Observer, 42 public input_method::InputMethodManager::Observer,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 bool powered) OVERRIDE; 216 bool powered) OVERRIDE;
216 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter, 217 virtual void AdapterDiscoveringChanged(device::BluetoothAdapter* adapter,
217 bool discovering) OVERRIDE; 218 bool discovering) OVERRIDE;
218 virtual void DeviceAdded(device::BluetoothAdapter* adapter, 219 virtual void DeviceAdded(device::BluetoothAdapter* adapter,
219 device::BluetoothDevice* device) OVERRIDE; 220 device::BluetoothDevice* device) OVERRIDE;
220 virtual void DeviceChanged(device::BluetoothAdapter* adapter, 221 virtual void DeviceChanged(device::BluetoothAdapter* adapter,
221 device::BluetoothDevice* device) OVERRIDE; 222 device::BluetoothDevice* device) OVERRIDE;
222 virtual void DeviceRemoved(device::BluetoothAdapter* adapter, 223 virtual void DeviceRemoved(device::BluetoothAdapter* adapter,
223 device::BluetoothDevice* device) OVERRIDE; 224 device::BluetoothDevice* device) OVERRIDE;
224 225
226 void OnStartBluetoothDiscoverySession(
227 scoped_ptr<device::BluetoothDiscoverySession> discovery_session);
228
225 // Overridden from SystemKeyEventListener::CapsLockObserver. 229 // Overridden from SystemKeyEventListener::CapsLockObserver.
226 virtual void OnCapsLockChange(bool enabled) OVERRIDE; 230 virtual void OnCapsLockChange(bool enabled) OVERRIDE;
227 231
228 void UpdateEnterpriseDomain(); 232 void UpdateEnterpriseDomain();
229 233
230 // Overridden from CloudPolicyStore::Observer 234 // Overridden from CloudPolicyStore::Observer
231 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) OVERRIDE; 235 virtual void OnStoreLoaded(policy::CloudPolicyStore* store) OVERRIDE;
232 virtual void OnStoreError(policy::CloudPolicyStore* store) OVERRIDE; 236 virtual void OnStoreError(policy::CloudPolicyStore* store) OVERRIDE;
233 // Overridden from ash::SessionStateObserver 237 // Overridden from ash::SessionStateObserver
234 virtual void UserAddedToSession(const std::string& user_id) OVERRIDE; 238 virtual void UserAddedToSession(const std::string& user_id) OVERRIDE;
235 239
236 void OnAccessibilityStatusChanged( 240 void OnAccessibilityStatusChanged(
237 const AccessibilityStatusEventDetails& details); 241 const AccessibilityStatusEventDetails& details);
238 242
239 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_; 243 base::WeakPtrFactory<SystemTrayDelegateChromeOS> weak_ptr_factory_;
240 scoped_ptr<content::NotificationRegistrar> registrar_; 244 scoped_ptr<content::NotificationRegistrar> registrar_;
241 scoped_ptr<PrefChangeRegistrar> local_state_registrar_; 245 scoped_ptr<PrefChangeRegistrar> local_state_registrar_;
242 scoped_ptr<PrefChangeRegistrar> user_pref_registrar_; 246 scoped_ptr<PrefChangeRegistrar> user_pref_registrar_;
243 Profile* user_profile_; 247 Profile* user_profile_;
244 base::HourClockType clock_type_; 248 base::HourClockType clock_type_;
245 int search_key_mapped_to_; 249 int search_key_mapped_to_;
246 bool screen_locked_; 250 bool screen_locked_;
247 bool have_session_start_time_; 251 bool have_session_start_time_;
248 base::TimeTicks session_start_time_; 252 base::TimeTicks session_start_time_;
249 bool have_session_length_limit_; 253 bool have_session_length_limit_;
250 base::TimeDelta session_length_limit_; 254 base::TimeDelta session_length_limit_;
251 std::string enterprise_domain_; 255 std::string enterprise_domain_;
256 bool should_run_bluetooth_discovery_;
252 257
253 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_; 258 scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
259 scoped_ptr<device::BluetoothDiscoverySession> bluetooth_discovery_session_;
254 scoped_ptr<ash::VolumeControlDelegate> volume_control_delegate_; 260 scoped_ptr<ash::VolumeControlDelegate> volume_control_delegate_;
255 scoped_ptr<CrosSettingsObserverSubscription> device_settings_observer_; 261 scoped_ptr<CrosSettingsObserverSubscription> device_settings_observer_;
256 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; 262 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_;
257 263
258 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS); 264 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateChromeOS);
259 }; 265 };
260 266
261 ash::SystemTrayDelegate* CreateSystemTrayDelegate(); 267 ash::SystemTrayDelegate* CreateSystemTrayDelegate();
262 268
263 } // namespace chromeos 269 } // namespace chromeos
264 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_ 270 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698