| 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/status/status_area_button.h" | 11 #include "chrome/browser/chromeos/status/status_area_button.h" |
| 12 #include "chrome/browser/prefs/pref_change_registrar.h" | 12 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 13 #include "chrome/browser/prefs/pref_member.h" | 13 #include "chrome/browser/prefs/pref_member.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_types.h" | 15 #include "content/public/browser/notification_types.h" |
| 16 #include "unicode/calendar.h" | 16 #include "unicode/calendar.h" |
| 17 #include "views/controls/button/menu_button.h" | 17 #include "views/controls/button/menu_button.h" |
| 18 #include "views/controls/menu/menu_delegate.h" | 18 #include "views/controls/menu/menu_delegate.h" |
| 19 #include "views/controls/menu/view_menu_delegate.h" | 19 #include "views/controls/menu/view_menu_delegate.h" |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 class MenuRunner; | 22 class MenuRunner; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace chromeos { | |
| 26 | |
| 27 // The clock menu button in the status area. | 25 // The clock menu button in the status area. |
| 28 // This button shows the current time. | 26 // This button shows the current time. |
| 29 class ClockMenuButton : public StatusAreaButton, | 27 class ClockMenuButton : public StatusAreaButton, |
| 30 public views::MenuDelegate, | 28 public views::MenuDelegate, |
| 31 public views::ViewMenuDelegate, | 29 public views::ViewMenuDelegate, |
| 32 public content::NotificationObserver { | 30 public content::NotificationObserver { |
| 33 public: | 31 public: |
| 34 explicit ClockMenuButton(StatusAreaButton::Delegate* delegate); | 32 explicit ClockMenuButton(StatusAreaButton::Delegate* delegate); |
| 35 virtual ~ClockMenuButton(); | 33 virtual ~ClockMenuButton(); |
| 36 | 34 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 scoped_ptr<views::MenuRunner> menu_runner_; | 70 scoped_ptr<views::MenuRunner> menu_runner_; |
| 73 | 71 |
| 74 PrefChangeRegistrar registrar_; | 72 PrefChangeRegistrar registrar_; |
| 75 | 73 |
| 76 // Default value for use_24hour_clock. | 74 // Default value for use_24hour_clock. |
| 77 bool default_use_24hour_clock_; | 75 bool default_use_24hour_clock_; |
| 78 | 76 |
| 79 DISALLOW_COPY_AND_ASSIGN(ClockMenuButton); | 77 DISALLOW_COPY_AND_ASSIGN(ClockMenuButton); |
| 80 }; | 78 }; |
| 81 | 79 |
| 82 } // namespace chromeos | |
| 83 | |
| 84 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_STATUS_CLOCK_MENU_BUTTON_H_ |
| OLD | NEW |