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

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: Initialize variable 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 9de3e0918b66331d66c866ee55f098d6613fafdd..1bb3dcaaba7e36b852b2513ee0bef8b11b29b050 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -50,6 +50,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/shelf_layout_manager.h"
#include "ash/wm/stacking_controller.h"
@@ -253,6 +254,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();
@@ -504,8 +506,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);

Powered by Google App Engine
This is Rietveld 408576698