OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
11 #include "chrome/browser/chromeos/cros/power_library.h" | 11 #include "chrome/browser/chromeos/cros/power_library.h" |
12 #include "chrome/browser/chromeos/status/status_area_button.h" | 12 #include "chrome/browser/chromeos/status/status_area_button.h" |
13 #include "chrome/browser/prefs/pref_change_registrar.h" | 13 #include "chrome/browser/prefs/pref_change_registrar.h" |
14 #include "chrome/browser/prefs/pref_member.h" | 14 #include "chrome/browser/prefs/pref_member.h" |
| 15 #include "content/common/content_notification_types.h" |
15 #include "content/common/notification_observer.h" | 16 #include "content/common/notification_observer.h" |
16 #include "content/common/notification_type.h" | |
17 #include "chrome/browser/chromeos/system/timezone_settings.h" | 17 #include "chrome/browser/chromeos/system/timezone_settings.h" |
18 #include "unicode/calendar.h" | 18 #include "unicode/calendar.h" |
19 #include "views/controls/button/menu_button.h" | 19 #include "views/controls/button/menu_button.h" |
20 #include "views/controls/menu/menu_delegate.h" | 20 #include "views/controls/menu/menu_delegate.h" |
21 #include "views/controls/menu/view_menu_delegate.h" | 21 #include "views/controls/menu/view_menu_delegate.h" |
22 | 22 |
23 namespace views { | 23 namespace views { |
24 class MenuItemView; | 24 class MenuItemView; |
25 } | 25 } |
26 | 26 |
(...skipping 26 matching lines...) Expand all Loading... |
53 virtual void TimezoneChanged(const icu::TimeZone& timezone); | 53 virtual void TimezoneChanged(const icu::TimeZone& timezone); |
54 | 54 |
55 // views::View | 55 // views::View |
56 virtual void OnLocaleChanged() OVERRIDE; | 56 virtual void OnLocaleChanged() OVERRIDE; |
57 | 57 |
58 // Updates the time on the menu button. Can be called by host if timezone | 58 // Updates the time on the menu button. Can be called by host if timezone |
59 // changes. | 59 // changes. |
60 void UpdateText(); | 60 void UpdateText(); |
61 | 61 |
62 // NotificationObserver implementation. | 62 // NotificationObserver implementation. |
63 virtual void Observe(NotificationType type, | 63 virtual void Observe(int type, |
64 const NotificationSource& source, | 64 const NotificationSource& source, |
65 const NotificationDetails& details); | 65 const NotificationDetails& details); |
66 | 66 |
67 protected: | 67 protected: |
68 virtual int horizontal_padding(); | 68 virtual int horizontal_padding(); |
69 | 69 |
70 private: | 70 private: |
71 // views::ViewMenuDelegate implementation. | 71 // views::ViewMenuDelegate implementation. |
72 virtual void RunMenu(views::View* source, const gfx::Point& pt); | 72 virtual void RunMenu(views::View* source, const gfx::Point& pt); |
73 | 73 |
(...skipping 11 matching lines...) Expand all Loading... |
85 scoped_ptr<views::MenuItemView> menu_; | 85 scoped_ptr<views::MenuItemView> menu_; |
86 | 86 |
87 PrefChangeRegistrar registrar_; | 87 PrefChangeRegistrar registrar_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(ClockMenuButton); | 89 DISALLOW_COPY_AND_ASSIGN(ClockMenuButton); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace chromeos | 92 } // namespace chromeos |
93 | 93 |
94 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ | 94 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ |
OLD | NEW |