Chromium Code Reviews| Index: chrome/browser/ui/ash/system_tray_delegate_common.h |
| diff --git a/chrome/browser/ui/ash/system_tray_delegate_common.h b/chrome/browser/ui/ash/system_tray_delegate_common.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4b40d0c4088c6ed29c33c408e38f8bde6c89103f |
| --- /dev/null |
| +++ b/chrome/browser/ui/ash/system_tray_delegate_common.h |
| @@ -0,0 +1,186 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |
| +#define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |
| + |
| +#include <string> |
| + |
| +#include "ash/system/tray/system_tray_delegate.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/i18n/time_formatting.h" |
| +#include "base/macros.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| + |
| +namespace ash { |
| +class SystemTrayNotifier; |
| +} |
| + |
| +// Common base class for platform-specific implementations. |
| +class SystemTrayDelegateCommon : public ash::SystemTrayDelegate, |
| + public content::NotificationObserver { |
| + public: |
| + SystemTrayDelegateCommon(); |
| + |
| + virtual ~SystemTrayDelegateCommon(); |
| + |
| + // Overridden from ash::SystemTrayDelegate: |
| + virtual void Initialize() OVERRIDE; |
| + |
|
sky
2014/10/07 16:01:13
style guide says no newlines between these. And us
ygorshenin1
2014/10/07 16:18:09
Done.
|
| + virtual void Shutdown() OVERRIDE; |
| + |
| + virtual bool GetTrayVisibilityOnStartup() OVERRIDE; |
| + |
| + virtual ash::user::LoginStatus GetUserLoginStatus() const OVERRIDE; |
| + |
| + virtual void ChangeProfilePicture() OVERRIDE; |
| + |
| + virtual const std::string GetEnterpriseDomain() const OVERRIDE; |
| + |
| + virtual const base::string16 GetEnterpriseMessage() const OVERRIDE; |
| + |
| + virtual const std::string GetSupervisedUserManager() const OVERRIDE; |
| + |
| + virtual const base::string16 GetSupervisedUserManagerName() const OVERRIDE; |
| + |
| + virtual const base::string16 GetSupervisedUserMessage() const OVERRIDE; |
| + |
| + virtual bool IsUserSupervised() const OVERRIDE; |
| + |
| + virtual void GetSystemUpdateInfo(ash::UpdateInfo* info) const OVERRIDE; |
| + |
| + virtual base::HourClockType GetHourClockType() const OVERRIDE; |
| + |
| + virtual void ShowSettings() OVERRIDE; |
| + |
| + virtual bool ShouldShowSettings() OVERRIDE; |
| + |
| + virtual void ShowDateSettings() OVERRIDE; |
| + |
| + virtual void ShowSetTimeDialog() OVERRIDE; |
| + |
| + virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE; |
| + |
| + virtual void ShowBluetoothSettings() OVERRIDE; |
| + |
| + virtual void ShowDisplaySettings() OVERRIDE; |
| + |
| + virtual void ShowChromeSlow() OVERRIDE; |
| + |
| + virtual bool ShouldShowDisplayNotification() OVERRIDE; |
| + |
| + virtual void ShowIMESettings() OVERRIDE; |
| + |
| + virtual void ShowHelp() OVERRIDE; |
| + |
| + virtual void ShowAccessibilityHelp() OVERRIDE; |
| + |
| + virtual void ShowAccessibilitySettings() OVERRIDE; |
| + |
| + virtual void ShowPublicAccountInfo() OVERRIDE; |
| + |
| + virtual void ShowSupervisedUserInfo() OVERRIDE; |
| + |
| + virtual void ShowEnterpriseInfo() OVERRIDE; |
| + |
| + virtual void ShowUserLogin() OVERRIDE; |
| + |
| + virtual bool ShowSpringChargerReplacementDialog() OVERRIDE; |
| + |
| + virtual bool IsSpringChargerReplacementDialogVisible() OVERRIDE; |
| + |
| + virtual bool HasUserConfirmedSafeSpringCharger() OVERRIDE; |
| + |
| + virtual void ShutDown() OVERRIDE; |
| + |
| + virtual void SignOut() OVERRIDE; |
| + |
| + virtual void RequestLockScreen() OVERRIDE; |
| + |
| + virtual void RequestRestartForUpdate() OVERRIDE; |
| + |
| + virtual void GetAvailableBluetoothDevices( |
| + ash::BluetoothDeviceList* list) OVERRIDE; |
| + |
| + virtual void BluetoothStartDiscovering() OVERRIDE; |
| + |
| + virtual void BluetoothStopDiscovering() OVERRIDE; |
| + |
| + virtual void ConnectToBluetoothDevice(const std::string& address) OVERRIDE; |
| + |
| + virtual bool IsBluetoothDiscovering() OVERRIDE; |
| + |
| + virtual void GetCurrentIME(ash::IMEInfo* info) OVERRIDE; |
| + |
| + virtual void GetAvailableIMEList(ash::IMEInfoList* list) OVERRIDE; |
| + |
| + virtual void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) OVERRIDE; |
| + |
| + virtual void SwitchIME(const std::string& ime_id) OVERRIDE; |
| + |
| + virtual void ActivateIMEProperty(const std::string& key) OVERRIDE; |
| + |
| + virtual void ShowNetworkConfigure(const std::string& network_id) OVERRIDE; |
| + |
| + virtual bool EnrollNetwork(const std::string& network_id) OVERRIDE; |
| + |
| + virtual void ManageBluetoothDevices() OVERRIDE; |
| + |
| + virtual void ToggleBluetooth() OVERRIDE; |
| + |
| + virtual void ShowMobileSimDialog() OVERRIDE; |
| + |
| + virtual void ShowMobileSetupDialog(const std::string& service_path) OVERRIDE; |
| + |
| + virtual void ShowOtherNetworkDialog(const std::string& type) OVERRIDE; |
| + |
| + virtual bool GetBluetoothAvailable() OVERRIDE; |
| + |
| + virtual bool GetBluetoothEnabled() OVERRIDE; |
| + |
| + virtual bool GetBluetoothDiscovering() OVERRIDE; |
| + |
| + virtual void ChangeProxySettings() OVERRIDE; |
| + |
| + virtual ash::VolumeControlDelegate* GetVolumeControlDelegate() const OVERRIDE; |
| + |
| + virtual void SetVolumeControlDelegate( |
| + scoped_ptr<ash::VolumeControlDelegate> delegate) OVERRIDE; |
| + |
| + virtual bool GetSessionStartTime( |
| + base::TimeTicks* session_start_time) OVERRIDE; |
| + |
| + virtual bool GetSessionLengthLimit( |
| + base::TimeDelta* session_length_limit) OVERRIDE; |
| + |
| + virtual int GetSystemTrayMenuWidth() OVERRIDE; |
| + |
| + virtual void ActiveUserWasChanged() OVERRIDE; |
| + |
| + virtual bool IsSearchKeyMappedToCapsLock() OVERRIDE; |
| + |
| + virtual ash::tray::UserAccountsDelegate* GetUserAccountsDelegate( |
| + const std::string& user_id) OVERRIDE; |
| + |
| + private: |
| + ash::SystemTrayNotifier* GetSystemTrayNotifier(); |
| + |
| + void UpdateClockType(); |
| + |
| + // content::NotificationObserver implementation. |
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| + scoped_ptr<content::NotificationRegistrar> registrar_; |
| + base::HourClockType clock_type_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateCommon); |
| +}; |
| + |
| +ash::SystemTrayDelegate* CreateSystemTrayDelegate(); |
| + |
| +#endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |