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

Unified Diff: ash/shell.cc

Issue 11091023: ash : Decouple power button controller and session state controller. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix power button cancel behaviour + unittest Created 8 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
« no previous file with comments | « ash/shell.h ('k') | ash/test/test_shell_delegate.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 3584a2f4487f1004e0002fd77d5d4cefae019dbc..aa2591ada3ee382af52b8d97f06cdaa98cd6b42d 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -46,6 +46,7 @@
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/root_window_layout_manager.h"
#include "ash/wm/screen_dimmer.h"
+#include "ash/wm/session_state_controller.h"
#include "ash/wm/shadow_controller.h"
#include "ash/wm/stacking_controller.h"
#include "ash/wm/system_gesture_event_filter.h"
@@ -247,6 +248,7 @@ Shell::~Shell() {
drag_drop_controller_.reset();
magnification_controller_.reset();
power_button_controller_.reset();
+ session_state_controller_.reset();
resize_shadow_controller_.reset();
shadow_controller_.reset();
tooltip_controller_.reset();
@@ -488,8 +490,10 @@ void Shell::Init() {
// the correct size.
user_wallpaper_delegate_->InitializeWallpaper();
- power_button_controller_.reset(new PowerButtonController);
- AddShellObserver(power_button_controller_.get());
+ session_state_controller_.reset(new SessionStateController);
+ power_button_controller_.reset(new PowerButtonController(
+ session_state_controller_.get()));
+ AddShellObserver(session_state_controller_.get());
if (initially_hide_cursor_)
cursor_manager_.ShowCursor(false);
« no previous file with comments | « ash/shell.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698