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

Unified Diff: ash/metrics/task_switch_metrics_recorder.h

Issue 1153633006: Added UMA statistics for changing the active window via click or touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/metrics/task_switch_metrics_recorder.h
diff --git a/ash/metrics/task_switch_metrics_recorder.h b/ash/metrics/task_switch_metrics_recorder.h
index b2103be01d7a27a036cec32b1feaf9123f57db25..5a08757a6eb23aee24529de2dc8882ef5bb45b34 100644
--- a/ash/metrics/task_switch_metrics_recorder.h
+++ b/ash/metrics/task_switch_metrics_recorder.h
@@ -10,6 +10,10 @@
#include "ash/ash_export.h"
#include "base/containers/scoped_ptr_hash_map.h"
+namespace aura {
+class Window;
+} // namespace aura
+
namespace ash {
class TaskSwitchTimeTracker;
@@ -27,6 +31,8 @@ class ASH_EXPORT TaskSwitchMetricsRecorder {
// Task switches caused by selecting a window from overview mode which is
// different from the previously-active window.
kOverviewMode,
+ // TODO(bruthig):
+ kScreen,
tdanderson 2015/05/26 21:13:52 Since these values are being used to indicate the
bruthig 2015/06/03 21:59:31 Done.
// All task switches caused by shelf buttons, not including sub-menus.
kShelf,
// All task switches caused by the tab strip.
@@ -50,6 +56,9 @@ class ASH_EXPORT TaskSwitchMetricsRecorder {
// each |task_switch_source| value.
void OnTaskSwitch(TaskSwitchSource task_switch_source);
+ // Returns true if |window| is considered a task window.
+ bool IsATaskWindow(aura::Window* window) const;
+
private:
// Returns the TaskSwitchTimeTracker associated with the specified
// |task_switch_source|. May return nullptr if mapping does not exist yet.

Powered by Google App Engine
This is Rietveld 408576698