| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMON_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ | 6 #define CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "ash/system/tray/system_tray_delegate.h" | 11 #include "ash/system/tray/system_tray_delegate.h" |
| 11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 12 #include "base/i18n/time_formatting.h" | 13 #include "base/i18n/time_formatting.h" |
| 13 #include "base/macros.h" | 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 | 17 |
| 18 // Common base class for platform-specific implementations. | 18 // Common base class for platform-specific implementations. |
| 19 class SystemTrayDelegateCommon : public ash::SystemTrayDelegate, | 19 class SystemTrayDelegateCommon : public ash::SystemTrayDelegate, |
| 20 public content::NotificationObserver { | 20 public content::NotificationObserver { |
| 21 public: | 21 public: |
| 22 SystemTrayDelegateCommon(); | 22 SystemTrayDelegateCommon(); |
| 23 | 23 |
| 24 ~SystemTrayDelegateCommon() override; | 24 ~SystemTrayDelegateCommon() override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 38 int GetSystemTrayMenuWidth() override; | 38 int GetSystemTrayMenuWidth() override; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 void UpdateClockType(); | 41 void UpdateClockType(); |
| 42 | 42 |
| 43 // content::NotificationObserver implementation. | 43 // content::NotificationObserver implementation. |
| 44 void Observe(int type, | 44 void Observe(int type, |
| 45 const content::NotificationSource& source, | 45 const content::NotificationSource& source, |
| 46 const content::NotificationDetails& details) override; | 46 const content::NotificationDetails& details) override; |
| 47 | 47 |
| 48 scoped_ptr<content::NotificationRegistrar> registrar_; | 48 std::unique_ptr<content::NotificationRegistrar> registrar_; |
| 49 base::HourClockType clock_type_; | 49 base::HourClockType clock_type_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateCommon); | 51 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegateCommon); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ | 54 #endif // CHROME_BROWSER_UI_ASH_SYSTEM_TRAY_DELEGATE_COMMON_H_ |
| OLD | NEW |