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

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: Hook up TABLET_MODE switch to maximize_mode_controller 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
« no previous file with comments | « DEPS ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 427860a487e88766ac269beb8a147386f51f694f..9e99b9803d383e16acb94a7766a11df9ce407688 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
@@ -153,9 +154,6 @@ class ASH_EXPORT MaximizeModeController :
// Whether we have ever seen accelerometer data.
bool have_seen_accelerometer_data_;
- // True when the hinge angle has been detected past 180 degrees.
- bool lid_open_past_180_;
-
// Tracks time spent in (and out of) touchview mode.
base::Time touchview_usage_interval_start_time_;
base::TimeDelta total_touchview_time_;
@@ -169,6 +167,11 @@ 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 is on. This is used to force maximize mode.
+ bool tablet_mode_switch_is_on_;
+#endif
+
// Tracks when the lid is closed. Used to prevent entering maximize mode.
bool lid_is_closed_;
« no previous file with comments | « DEPS ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698