| 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 ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ |
| 6 #define ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ | 6 #define ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 11 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | 14 |
| 14 namespace ash { | 15 namespace ash { |
| 15 | 16 |
| 16 class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate { | 17 class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate { |
| 17 public: | 18 public: |
| 18 DefaultSystemTrayDelegate(); | 19 DefaultSystemTrayDelegate(); |
| 19 ~DefaultSystemTrayDelegate() override; | 20 ~DefaultSystemTrayDelegate() override; |
| 20 | 21 |
| 21 // SystemTrayDelegate | 22 // SystemTrayDelegate |
| 22 bool GetTrayVisibilityOnStartup() override; | 23 bool GetTrayVisibilityOnStartup() override; |
| 23 user::LoginStatus GetUserLoginStatus() const override; | 24 user::LoginStatus GetUserLoginStatus() const override; |
| 24 std::string GetSupervisedUserManager() const override; | 25 std::string GetSupervisedUserManager() const override; |
| 25 bool IsUserSupervised() const override; | 26 bool IsUserSupervised() const override; |
| 26 void GetSystemUpdateInfo(UpdateInfo* info) const override; | 27 void GetSystemUpdateInfo(UpdateInfo* info) const override; |
| 27 bool ShouldShowSettings() override; | 28 bool ShouldShowSettings() override; |
| 28 bool ShouldShowDisplayNotification() override; | 29 bool ShouldShowDisplayNotification() override; |
| 29 void ToggleBluetooth() override; | 30 void ToggleBluetooth() override; |
| 30 bool IsBluetoothDiscovering() override; | 31 bool IsBluetoothDiscovering() override; |
| 31 bool GetBluetoothAvailable() override; | 32 bool GetBluetoothAvailable() override; |
| 32 bool GetBluetoothEnabled() override; | 33 bool GetBluetoothEnabled() override; |
| 33 bool GetBluetoothDiscovering() override; | 34 bool GetBluetoothDiscovering() override; |
| 34 VolumeControlDelegate* GetVolumeControlDelegate() const override; | 35 VolumeControlDelegate* GetVolumeControlDelegate() const override; |
| 35 void SetVolumeControlDelegate( | 36 void SetVolumeControlDelegate( |
| 36 scoped_ptr<VolumeControlDelegate> delegate) override; | 37 std::unique_ptr<VolumeControlDelegate> delegate) override; |
| 37 int GetSystemTrayMenuWidth() override; | 38 int GetSystemTrayMenuWidth() override; |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 bool bluetooth_enabled_; | 41 bool bluetooth_enabled_; |
| 41 scoped_ptr<VolumeControlDelegate> volume_control_delegate_; | 42 std::unique_ptr<VolumeControlDelegate> volume_control_delegate_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(DefaultSystemTrayDelegate); | 44 DISALLOW_COPY_AND_ASSIGN(DefaultSystemTrayDelegate); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace ash | 47 } // namespace ash |
| 47 | 48 |
| 48 #endif // ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ | 49 #endif // ASH_SYSTEM_TRAY_DEFAULT_SYSTEM_TRAY_DELEGATE_H_ |
| OLD | NEW |