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

Unified Diff: ash/shell.cc

Issue 178183005: Add LogoutConfirmationController to show LogoutConfirmationDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 6 years, 10 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/shell.h ('k') | ash/system/logout_button/logout_button_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index b46ad3fa838445465eced9b8b6ff84539c0ee001..2b6a8c9998837261d66b1acea76f61252ed4a3d1 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -49,6 +49,7 @@
#include "ash/shell_factory.h"
#include "ash/shell_window_ids.h"
#include "ash/system/locale/locale_notification_controller.h"
+#include "ash/system/session/logout_confirmation_controller.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
@@ -80,6 +81,7 @@
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller.h"
#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "ui/aura/client/aura_constants.h"
@@ -666,6 +668,9 @@ Shell::~Shell() {
// TODO(xiyuan): Move it back when app list container is no longer needed.
app_list_controller_.reset();
+ // Destroy the LogoutConfirmationController before the SystemTrayDelegate.
+ logout_confirmation_controller_.reset();
+
// Destroy SystemTrayDelegate before destroying the status area(s).
system_tray_delegate_->Shutdown();
system_tray_delegate_.reset();
@@ -969,6 +974,12 @@ void Shell::Init() {
// Initialize system_tray_delegate_ after StatusAreaWidget is created.
system_tray_delegate_->Initialize();
+ // Create the LogoutConfirmationController after the SystemTrayDelegate.
+ logout_confirmation_controller_.reset(
+ new internal::LogoutConfirmationController(
+ base::Bind(&SystemTrayDelegate::SignOut,
+ base::Unretained(system_tray_delegate_.get()))));
+
// TODO(oshima): Initialize all RootWindowControllers once, and
// initialize controller/delegates above when initializing the
// primary root window controller.
« no previous file with comments | « ash/shell.h ('k') | ash/system/logout_button/logout_button_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698