OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "gfx/canvas.h" | |
14 #include "gfx/font.h" | |
15 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
16 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
17 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 16 #include "ui/gfx/canvas.h" |
| 17 #include "ui/gfx/font.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 // Amount of slop to add into the timer to make sure we're into the next minute | 21 // Amount of slop to add into the timer to make sure we're into the next minute |
22 // when the timer goes off. | 22 // when the timer goes off. |
23 const int kTimerSlopSeconds = 1; | 23 const int kTimerSlopSeconds = 1; |
24 | 24 |
25 #if defined(CROS_FONTS_USING_BCI) | 25 #if defined(CROS_FONTS_USING_BCI) |
26 const int kFontSizeDelta = 0; | 26 const int kFontSizeDelta = 0; |
27 #else | 27 #else |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 void ClockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { | 123 void ClockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { |
124 if (!clock_menu_.get()) | 124 if (!clock_menu_.get()) |
125 clock_menu_.reset(new views::Menu2(this)); | 125 clock_menu_.reset(new views::Menu2(this)); |
126 else | 126 else |
127 clock_menu_->Rebuild(); | 127 clock_menu_->Rebuild(); |
128 clock_menu_->UpdateStates(); | 128 clock_menu_->UpdateStates(); |
129 clock_menu_->RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT); | 129 clock_menu_->RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT); |
130 } | 130 } |
131 | 131 |
132 } // namespace chromeos | 132 } // namespace chromeos |
OLD | NEW |