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

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

Issue 914673003: Correctly record TouchView metrics on suspend/shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compilation Created 5 years, 10 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 | « no previous file | 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 f7959661cfb9f6468382b6f267da677b58196f87..679f01bc1f5af19d6b9344a61f14082fd1c3d3c9 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/wm/maximize_mode/maximize_mode_controller.h
@@ -97,6 +97,13 @@ class ASH_EXPORT MaximizeModeController :
friend class test::MultiUserWindowManagerChromeOSTest;
friend class test::VirtualKeyboardControllerTest;
+ // Used for recording metrics for intervals of time spent in
+ // and out of TouchView.
+ enum TouchViewIntervalType {
+ TOUCH_VIEW_INTERVAL_INACTIVE,
+ TOUCH_VIEW_INTERVAL_ACTIVE
+ };
+
// Set the TickClock. This is only to be used by tests that need to
// artificially and deterministically control the current time.
void SetTickClockForTest(scoped_ptr<base::TickClock> tick_clock);
@@ -118,8 +125,16 @@ class ASH_EXPORT MaximizeModeController :
// is no rotation lock.
void LeaveMaximizeMode();
- // Record UMA stats tracking touchview usage.
- void RecordTouchViewStateTransition();
+ // Record UMA stats tracking TouchView usage. If |type| is
+ // TOUCH_VIEW_INTERVAL_INACTIVE, then record that TouchView has been
+ // inactive from |touchview_usage_interval_start_time_| until now.
+ // Similarly, record that TouchView has been active if |type| is
+ // TOUCH_VIEW_INTERVAL_ACTIVE.
+ void RecordTouchViewUsageInterval(TouchViewIntervalType type);
+
+ // Returns TOUCH_VIEW_INTERVAL_ACTIVE if TouchView is currently active,
+ // otherwise returns TOUCH_VIEW_INTERNAL_INACTIVE.
+ TouchViewIntervalType CurrentTouchViewIntervalType();
// The maximized window manager (if enabled).
scoped_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_;
@@ -135,7 +150,7 @@ class ASH_EXPORT MaximizeModeController :
bool lid_open_past_180_;
// Tracks time spent in (and out of) touchview mode.
- base::Time last_touchview_transition_time_;
+ base::Time touchview_usage_interval_start_time_;
base::TimeDelta total_touchview_time_;
base::TimeDelta total_non_touchview_time_;
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698