Index: chrome/browser/chromeos/status/clock_menu_button.cc |
diff --git a/chrome/browser/chromeos/status/clock_menu_button.cc b/chrome/browser/chromeos/status/clock_menu_button.cc |
index 7c6b1958262b2c0b7367b911e5f5e00fdb60b2a2..86ed2835e8edf9e8eb2d477988cd2abb358d2e67 100644 |
--- a/chrome/browser/chromeos/status/clock_menu_button.cc |
+++ b/chrome/browser/chromeos/status/clock_menu_button.cc |
@@ -8,11 +8,10 @@ |
#include "base/string_util.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
-#include "chrome/browser/chromeos/cros/cros_library.h" |
#include "chrome/browser/chromeos/status/status_area_view_chromeos.h" |
-#include "chrome/browser/chromeos/view_ids.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/ui/view_ids.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/notification_details.h" |
@@ -35,8 +34,6 @@ enum ClockMenuItem { |
} // namespace |
-namespace chromeos { |
- |
// Amount of slop to add into the timer to make sure we're into the next minute |
// when the timer goes off. |
const int kTimerSlopSeconds = 1; |
@@ -45,13 +42,14 @@ ClockMenuButton::ClockMenuButton(StatusAreaButton::Delegate* delegate) |
: StatusAreaButton(delegate, this), |
default_use_24hour_clock_(false) { |
set_id(VIEW_ID_STATUS_BUTTON_CLOCK); |
+#if defined(OS_CHROMEOS) |
DaveMoore
2011/11/10 02:05:46
Whenever we have a #if defined(OS_CHROMEOS) in a f
stevenjb
2011/11/10 19:57:52
Done.
|
// Start monitoring the kUse24HourClock preference. |
Profile* profile = ProfileManager::GetDefaultProfile(); |
if (profile) { // This can be NULL in the login screen. |
registrar_.Init(profile->GetPrefs()); |
registrar_.Add(prefs::kUse24HourClock, this); |
} |
- |
+#endif |
UpdateTextAndSetNextTimer(); |
} |
@@ -114,12 +112,14 @@ void ClockMenuButton::SetDefaultUse24HourClock(bool use_24hour_clock) { |
void ClockMenuButton::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
+#if defined(OS_CHROMEOS) |
if (type == chrome::NOTIFICATION_PREF_CHANGED) { |
std::string* pref_name = content::Details<std::string>(details).ptr(); |
if (*pref_name == prefs::kUse24HourClock) { |
UpdateText(); |
} |
} |
+#endif |
} |
// ClockMenuButton, views::MenuDelegate implementation: |
@@ -136,7 +136,7 @@ bool ClockMenuButton::IsCommandEnabled(int id) const { |
void ClockMenuButton::ExecuteCommand(int id) { |
DCHECK_EQ(CLOCK_OPEN_OPTIONS_ITEM, id); |
delegate()->ExecuteStatusAreaCommand( |
- this, StatusAreaViewChromeos::SHOW_SYSTEM_OPTIONS); |
+ this, StatusAreaButton::Delegate::SHOW_SYSTEM_OPTIONS); |
} |
int ClockMenuButton::horizontal_padding() { |
@@ -180,7 +180,7 @@ void ClockMenuButton::EnsureMenu() { |
// If options UI is available, show a separator and configure menu item. |
if (delegate()->ShouldExecuteStatusAreaCommand( |
- this, StatusAreaViewChromeos::SHOW_SYSTEM_OPTIONS)) { |
+ this, StatusAreaButton::Delegate::SHOW_SYSTEM_OPTIONS)) { |
menu->AppendSeparator(); |
const string16 clock_open_options_label = |
@@ -189,5 +189,3 @@ void ClockMenuButton::EnsureMenu() { |
clock_open_options_label); |
} |
} |
- |
-} // namespace chromeos |