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

Unified Diff: ash/wm/power_button_controller.cc

Issue 10825191: Allow closing root window, or pressing the power button to shutdown ash_shell, and chrome /w chrome… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed removing this somehow Created 8 years, 4 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/wm/power_button_controller.h ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/power_button_controller.cc
diff --git a/ash/wm/power_button_controller.cc b/ash/wm/power_button_controller.cc
index 73c1a3bbbafbd8155db17c41bbf708ec6b40763b..55d59931ee8f75ef047a408b53b320f0f9914044 100644
--- a/ash/wm/power_button_controller.cc
+++ b/ash/wm/power_button_controller.cc
@@ -6,6 +6,7 @@
#include "ash/ash_switches.h"
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/cursor_manager.h"
#include "base/command_line.h"
@@ -472,6 +473,12 @@ void PowerButtonController::OnRootWindowResized(const aura::RootWindow* root,
background_layer_->SetBounds(gfx::Rect(root->bounds().size()));
}
+void PowerButtonController::OnRootWindowHostCloseRequested(
+ const aura::RootWindow*) {
+ if(Shell::GetInstance() && Shell::GetInstance()->delegate())
+ Shell::GetInstance()->delegate()->Exit();
+}
+
bool PowerButtonController::LoggedInAsNonGuest() const {
if (login_status_ == user::LOGGED_IN_NONE)
return false;
« no previous file with comments | « ash/wm/power_button_controller.h ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698