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

Unified Diff: ash/shell.cc

Issue 2474913004: Tablet-like power button behavior on Convertible/Tablet ChromeOS devices (Closed)
Patch Set: based on comments Created 4 years, 1 month 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 9c211fc9360204fee838b499d6369311d6cd65a8..c992a548c761c601982ebd944f940e562673cbfa 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -126,6 +126,7 @@
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/sticky_keys/sticky_keys_controller.h"
#include "ash/system/chromeos/power/power_event_observer.h"
+#include "ash/system/chromeos/power/tablet_power_button_controller.h"
#include "ash/system/chromeos/power/video_activity_notifier.h"
#include "ash/touch/touch_transformer_controller.h"
#include "ash/virtual_keyboard_controller.h"
@@ -514,6 +515,9 @@ Shell::~Shell() {
toplevel_window_event_handler_.reset();
visibility_controller_.reset();
+#if defined(OS_CHROMEOS)
+ tablet_power_button_controller_.reset();
+#endif
power_button_controller_.reset();
lock_state_controller_.reset();
@@ -823,6 +827,8 @@ void Shell::Init(const ShellInitParams& init_params) {
bluetooth_notification_controller_.reset(new BluetoothNotificationController);
screen_orientation_controller_.reset(new ScreenOrientationController());
screen_layout_observer_.reset(new ScreenLayoutObserver());
+ tablet_power_button_controller_.reset(
+ new TabletPowerButtonController(lock_state_controller_.get()));
#endif
// The compositor thread and main message loop have to be running in
// order to create mirror window. Run it after the main message loop

Powered by Google App Engine
This is Rietveld 408576698