| Index: chrome/browser/chromeos/status/clock_menu_button.h
|
| diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h
|
| index 12b508a3130ec25dae64455c2d931fff8d8dec59..92a6949732b6a604c0bf66c78085278bba65d494 100644
|
| --- a/chrome/browser/chromeos/status/clock_menu_button.h
|
| +++ b/chrome/browser/chromeos/status/clock_menu_button.h
|
| @@ -33,32 +33,37 @@ class ClockMenuButton : public StatusAreaButton,
|
| explicit ClockMenuButton(StatusAreaButton::Delegate* delegate);
|
| virtual ~ClockMenuButton();
|
|
|
| + // content::NotificationObserver implementation.
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| // views::MenuDelegate implementation
|
| virtual string16 GetLabel(int id) const OVERRIDE;
|
| virtual bool IsCommandEnabled(int id) const OVERRIDE;
|
| virtual void ExecuteCommand(int id) OVERRIDE;
|
|
|
| - // views::View
|
| - virtual void OnLocaleChanged() OVERRIDE;
|
| + // Initialize PrefChangeRegistrar with the current default profile.
|
| + void UpdateProfile();
|
|
|
| // Updates the time on the menu button.
|
| void UpdateText();
|
|
|
| - // Sets default use 24hour clock mode.
|
| - void SetDefaultUse24HourClock(bool use_24hour_clock);
|
| -
|
| - // content::NotificationObserver implementation.
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) OVERRIDE;
|
| -
|
| protected:
|
| + // StatusAreaButton implementation
|
| + virtual void SetMenuActive(bool active) OVERRIDE;
|
| virtual int horizontal_padding() OVERRIDE;
|
|
|
| - private:
|
| + // views::View implementation
|
| + virtual void OnLocaleChanged() OVERRIDE;
|
| +
|
| // views::ViewMenuDelegate implementation.
|
| virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
|
|
|
| + private:
|
| + // Sets default use 24hour clock mode.
|
| + void SetUse24HourClock(bool use_24hour_clock);
|
| +
|
| // Create and initialize menu if not already present.
|
| void EnsureMenu();
|
|
|
| @@ -70,10 +75,11 @@ class ClockMenuButton : public StatusAreaButton,
|
| // The clock menu.
|
| scoped_ptr<views::MenuRunner> menu_runner_;
|
|
|
| - PrefChangeRegistrar registrar_;
|
| + PrefService* pref_service_;
|
| + scoped_ptr<PrefChangeRegistrar> registrar_;
|
|
|
| - // Default value for use_24hour_clock.
|
| - bool default_use_24hour_clock_;
|
| + // Cached value for use_24hour_clock.
|
| + bool use_24hour_clock_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ClockMenuButton);
|
| };
|
|
|