Index: ash/system/date/date_default_view.h |
diff --git a/ash/system/date/date_default_view.h b/ash/system/date/date_default_view.h |
index 0a7d43d883d70ccd7435b607fbd9844e27afac7d..25bddfcac393b6a829e76a9b74e8a425ca3114ab 100644 |
--- a/ash/system/date/date_default_view.h |
+++ b/ash/system/date/date_default_view.h |
@@ -6,8 +6,10 @@ |
#define ASH_SYSTEM_DATE_DATE_DEFAULT_VIEW_H_ |
#include "ash/ash_export.h" |
+#include "ash/system/chromeos/shutdown_policy_observer.h" |
#include "ash/system/user/login_status.h" |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "ui/views/controls/button/button.h" |
#include "ui/views/view.h" |
@@ -19,7 +21,8 @@ class DateView; |
class TrayPopupHeaderButton; |
class ASH_EXPORT DateDefaultView : public views::View, |
- public views::ButtonListener { |
+ public views::ButtonListener, |
+ public ash::ShutdownPolicyObserver { |
public: |
explicit DateDefaultView(ash::user::LoginStatus login); |
@@ -30,15 +33,20 @@ class ASH_EXPORT DateDefaultView : public views::View, |
tray::DateView* GetDateView(); |
const tray::DateView* GetDateView() const; |
+ // ash::ShutdownPolicyObserver: |
+ void OnShutdownPolicyChanged(bool reboot_on_shutdown) override; |
+ |
private: |
// Overridden from views::ButtonListener. |
void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
- TrayPopupHeaderButton* help_; |
- TrayPopupHeaderButton* shutdown_; |
- TrayPopupHeaderButton* lock_; |
+ TrayPopupHeaderButton* help_button_; |
+ TrayPopupHeaderButton* shutdown_button_; |
+ TrayPopupHeaderButton* lock_button_; |
tray::DateView* date_view_; |
+ base::WeakPtrFactory<DateDefaultView> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DateDefaultView); |
}; |