Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: chrome/browser/chromeos/clock_menu_button.cc

Issue 341044: Move chromeos code to namespace chromeos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/clock_menu_button.h" 5 #include "chrome/browser/chromeos/clock_menu_button.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/font.h" 8 #include "app/gfx/font.h"
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/i18n/time_formatting.h" 11 #include "base/i18n/time_formatting.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "chrome/browser/browser.h" 14 #include "chrome/browser/browser.h"
15 #include "chrome/browser/profile.h" 15 #include "chrome/browser/profile.h"
16 #include "chrome/common/notification_service.h" 16 #include "chrome/common/notification_service.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
19 #include "unicode/calendar.h" 19 #include "unicode/calendar.h"
20 20
21 namespace chromeos {
22
21 // Amount of slop to add into the timer to make sure we're into the next minute 23 // Amount of slop to add into the timer to make sure we're into the next minute
22 // when the timer goes off. 24 // when the timer goes off.
23 const int kTimerSlopSeconds = 1; 25 const int kTimerSlopSeconds = 1;
24 26
25 ClockMenuButton::ClockMenuButton(Browser* browser) 27 ClockMenuButton::ClockMenuButton(Browser* browser)
26 : MenuButton(NULL, std::wstring(), this, false), 28 : MenuButton(NULL, std::wstring(), this, false),
27 clock_menu_(this), 29 clock_menu_(this),
28 browser_(browser) { 30 browser_(browser) {
29 set_border(NULL); 31 set_border(NULL);
30 SetFont(ResourceBundle::GetSharedInstance().GetFont( 32 SetFont(ResourceBundle::GetSharedInstance().GetFont(
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 135 }
134 136
135 //////////////////////////////////////////////////////////////////////////////// 137 ////////////////////////////////////////////////////////////////////////////////
136 // ClockMenuButton, views::ViewMenuDelegate implementation: 138 // ClockMenuButton, views::ViewMenuDelegate implementation:
137 139
138 void ClockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { 140 void ClockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) {
139 clock_menu_.Rebuild(); 141 clock_menu_.Rebuild();
140 clock_menu_.UpdateStates(); 142 clock_menu_.UpdateStates();
141 clock_menu_.RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT); 143 clock_menu_.RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT);
142 } 144 }
145
146 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698