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

Unified Diff: ash/system/date/date_default_view.h

Issue 811033002: Add device policy to disallow shutdown - ash UI modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/chromeos/shutdown_policy_observer.h ('k') | ash/system/date/date_default_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « ash/system/chromeos/shutdown_policy_observer.h ('k') | ash/system/date/date_default_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698