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 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ |
7 | 7 |
8 #include "ash/common/system/chromeos/bluetooth/bluetooth_observer.h" | 8 #include "ash/common/system/chromeos/bluetooth/bluetooth_observer.h" |
9 #include "ash/common/system/tray/system_tray_item.h" | 9 #include "ash/common/system/tray/system_tray_item.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace tray { | 13 namespace tray { |
14 class BluetoothDefaultView; | 14 class BluetoothDefaultView; |
15 class BluetoothDetailedView; | 15 class BluetoothDetailedView; |
16 } | 16 } |
17 | 17 |
| 18 // Bluetooth section in the main system tray menu. Contains: |
| 19 // * Toggle to turn Bluetooth on and off |
| 20 // * Gear icon that takes the user to the web ui settings |
| 21 // * List of paired devices |
| 22 // * List of unpaired devices |
18 class TrayBluetooth : public SystemTrayItem, public BluetoothObserver { | 23 class TrayBluetooth : public SystemTrayItem, public BluetoothObserver { |
19 public: | 24 public: |
20 explicit TrayBluetooth(SystemTray* system_tray); | 25 explicit TrayBluetooth(SystemTray* system_tray); |
21 ~TrayBluetooth() override; | 26 ~TrayBluetooth() override; |
22 | 27 |
23 private: | 28 private: |
24 // Overridden from SystemTrayItem. | 29 // Overridden from SystemTrayItem. |
25 views::View* CreateTrayView(LoginStatus status) override; | 30 views::View* CreateTrayView(LoginStatus status) override; |
26 views::View* CreateDefaultView(LoginStatus status) override; | 31 views::View* CreateDefaultView(LoginStatus status) override; |
27 views::View* CreateDetailedView(LoginStatus status) override; | 32 views::View* CreateDetailedView(LoginStatus status) override; |
28 void DestroyTrayView() override; | 33 void DestroyTrayView() override; |
29 void DestroyDefaultView() override; | 34 void DestroyDefaultView() override; |
30 void DestroyDetailedView() override; | 35 void DestroyDetailedView() override; |
31 void UpdateAfterLoginStatusChange(LoginStatus status) override; | 36 void UpdateAfterLoginStatusChange(LoginStatus status) override; |
32 | 37 |
33 // Overridden from BluetoothObserver. | 38 // Overridden from BluetoothObserver. |
34 void OnBluetoothRefresh() override; | 39 void OnBluetoothRefresh() override; |
35 void OnBluetoothDiscoveringChanged() override; | 40 void OnBluetoothDiscoveringChanged() override; |
36 | 41 |
37 tray::BluetoothDefaultView* default_; | 42 tray::BluetoothDefaultView* default_; |
38 tray::BluetoothDetailedView* detailed_; | 43 tray::BluetoothDetailedView* detailed_; |
39 | 44 |
40 DISALLOW_COPY_AND_ASSIGN(TrayBluetooth); | 45 DISALLOW_COPY_AND_ASSIGN(TrayBluetooth); |
41 }; | 46 }; |
42 | 47 |
43 } // namespace ash | 48 } // namespace ash |
44 | 49 |
45 #endif // ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ | 50 #endif // ASH_COMMON_SYSTEM_CHROMEOS_BLUETOOTH_TRAY_BLUETOOTH_H_ |
OLD | NEW |