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

Unified Diff: ash/wm/maximize_mode/maximize_mode_controller.h

Issue 2020553003: Hook up TABLET_MODE switch to maximize_mode_controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/wm/maximize_mode/maximize_mode_controller.h
diff --git a/ash/wm/maximize_mode/maximize_mode_controller.h b/ash/wm/maximize_mode/maximize_mode_controller.h
index b761a4d3d2dbb8cec81f2930733565cfaeead67a..9642573eb3666eaded895d7ebfdfce87e9ead23b 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -93,6 +93,7 @@ class ASH_EXPORT MaximizeModeController :
// PowerManagerClient::Observer:
void LidEventReceived(bool open, const base::TimeTicks& time) override;
+ void TabletModeEventReceived(bool on, const base::TimeTicks& time) override;
void SuspendImminent() override;
void SuspendDone(const base::TimeDelta& sleep_duration) override;
#endif // OS_CHROMEOS
@@ -169,6 +170,12 @@ class ASH_EXPORT MaximizeModeController :
// Source for the current time in base::TimeTicks.
std::unique_ptr<base::TickClock> tick_clock_;
+#if defined(OS_CHROMEOS)
+ // Set when tablet mode switch transitions from on to off. This is used to
+ // make HandleHingeRotation check whether we need to disable maximize mode.
+ bool tablet_mode_switch_was_on_;
Daniel Erat 2016/06/06 15:24:55 it would probably be better to track "is_on" inste
jcliang 2016/06/06 16:48:36 Yes I agree. This is improved after we remove lid_
+#endif
+
// Tracks when the lid is closed. Used to prevent entering maximize mode.
bool lid_is_closed_;
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698