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

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. Rebased. 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 36357d0ee15a6d5b155982b9a7063e9e145bf875..1a4da8ebd2f920d8e197ee99456e3b16a16e6a24 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/logout_confirmation/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"
@@ -655,6 +657,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();
@@ -957,6 +962,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.

Powered by Google App Engine
This is Rietveld 408576698