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

Unified Diff: ash/system/logout_button/logout_button_tray.h

Issue 40053002: Implements the dialog view for logout button tray in public sessions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add preference for dialog duration Created 7 years, 2 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
Index: ash/system/logout_button/logout_button_tray.h
diff --git a/ash/system/logout_button/logout_button_tray.h b/ash/system/logout_button/logout_button_tray.h
index 5683e5e2654c13f52e1d2e9efe0a9403e91b9cf2..8abca7232f7ff4a46c1aa1275673dff8786035cc 100644
--- a/ash/system/logout_button/logout_button_tray.h
+++ b/ash/system/logout_button/logout_button_tray.h
@@ -10,6 +10,8 @@
#include "ash/system/user/login_status.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "ui/views/controls/button/button.h"
namespace views {
@@ -20,6 +22,7 @@ namespace ash {
namespace internal {
class StatusAreaWidget;
+class LogoutConfirmationDialogView;
// Adds a logout button to the launcher's status area if enabled by the
// kShowLogoutButtonInTray pref.
@@ -30,6 +33,9 @@ class LogoutButtonTray : public TrayBackgroundView,
explicit LogoutButtonTray(StatusAreaWidget* status_area_widget);
virtual ~LogoutButtonTray();
+ void EnsureConfirmationDialogShown();
bartfab (slow) 2013/10/28 16:24:07 Nit: I know I suggested the name but I think it ca
binjin 2013/10/29 16:07:05 Done.
+ void EnsureConfirmationDialogClosed();
bartfab (slow) 2013/10/28 16:24:07 Nit: Add "Is" to the name: EnsureConfirmationDial
binjin 2013/10/29 16:07:05 Done.
+
// TrayBackgroundView:
virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
@@ -39,6 +45,7 @@ class LogoutButtonTray : public TrayBackgroundView,
// LogoutButtonObserver:
virtual void OnShowLogoutButtonInTrayChanged(bool show) OVERRIDE;
+ virtual void OnLogoutDialogDurationChanged(int duration) OVERRIDE;
// views::ButtonListener:
virtual void ButtonPressed(views::Button* sender,
@@ -52,6 +59,9 @@ class LogoutButtonTray : public TrayBackgroundView,
views::LabelButton* button_; // Not owned.
user::LoginStatus login_status_;
bool show_logout_button_in_tray_;
+ base::TimeDelta dialog_duration_;
+
+ base::WeakPtr<LogoutConfirmationDialogView> confirm_dialog_;
bartfab (slow) 2013/10/28 16:24:07 Nit: s/confirm_dialog_/confirmation_dialog_/
binjin 2013/10/29 16:07:05 Done.
DISALLOW_COPY_AND_ASSIGN(LogoutButtonTray);
};

Powered by Google App Engine
This is Rietveld 408576698