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 #include "chrome/browser/chromeos/status/clock_menu_button.h" | 5 #include "chrome/browser/chromeos/status/clock_menu_button.h" |
6 | 6 |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 11 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "chrome/browser/chromeos/status/status_area_host.h" | 12 #include "chrome/browser/chromeos/status/status_area_host.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "content/common/notification_details.h" | 17 #include "content/common/notification_details.h" |
18 #include "content/common/notification_source.h" | 18 #include "content/common/notification_source.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
22 #include "ui/gfx/font.h" | 22 #include "ui/gfx/font.h" |
23 #include "views/controls/menu/menu_runner.h" | 23 #include "views/controls/menu/menu_runner.h" |
24 #include "views/widget/widget.h" | 24 #include "views/widget/widget.h" |
25 #include "unicode/datefmt.h" | 25 #include "unicode/datefmt.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // views::MenuItemView item ids | 29 // views::MenuItemView item ids |
30 enum { | 30 enum ClockMenuItem { |
31 CLOCK_DISPLAY_ITEM, | 31 CLOCK_DISPLAY_ITEM, |
32 CLOCK_OPEN_OPTIONS_ITEM | 32 CLOCK_OPEN_OPTIONS_ITEM |
33 }; | 33 }; |
34 | 34 |
35 } // namespace | 35 } // namespace |
36 | 36 |
37 namespace chromeos { | 37 namespace chromeos { |
38 | 38 |
39 // Amount of slop to add into the timer to make sure we're into the next minute | 39 // Amount of slop to add into the timer to make sure we're into the next minute |
40 // when the timer goes off. | 40 // when the timer goes off. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 const string16 clock_open_options_label = | 188 const string16 clock_open_options_label = |
189 l10n_util::GetStringUTF16(IDS_STATUSBAR_CLOCK_OPEN_OPTIONS_DIALOG); | 189 l10n_util::GetStringUTF16(IDS_STATUSBAR_CLOCK_OPEN_OPTIONS_DIALOG); |
190 menu->AppendMenuItemWithLabel( | 190 menu->AppendMenuItemWithLabel( |
191 CLOCK_OPEN_OPTIONS_ITEM, | 191 CLOCK_OPEN_OPTIONS_ITEM, |
192 UTF16ToWide(clock_open_options_label)); | 192 UTF16ToWide(clock_open_options_label)); |
193 } | 193 } |
194 } | 194 } |
195 | 195 |
196 } // namespace chromeos | 196 } // namespace chromeos |
OLD | NEW |