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

Side by Side Diff: ash/metrics/desktop_task_switch_metric_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: Fixed the branch that the CL was based on. Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_METRICS_DESKTOP_TASK_SWITCH_METRIC_RECORDER_H_
6 #define ASH_METRICS_DESKTOP_TASK_SWITCH_METRIC_RECORDER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/macros.h"
10 #include "ui/wm/public/activation_change_observer.h"
11
12 namespace ash {
13
14 class UserMetricsRecorder;
15
16 // Tracks metrics for task switches caused by the user activating a task window
17 // by clicking or tapping on it.
18 class ASH_EXPORT DesktopTaskSwitchMetricRecorder
19 : public aura::client::ActivationChangeObserver {
20 public:
21 explicit DesktopTaskSwitchMetricRecorder();
22 ~DesktopTaskSwitchMetricRecorder() override;
23
24 // aura::client::ActivationChangeObserver:
25 void OnWindowActivated(
26 aura::client::ActivationChangeObserver::ActivationReason reason,
27 aura::Window* gained_active,
28 aura::Window* lost_active) override;
29
30 private:
31 // Tracks the last active task window.
32 aura::Window* last_active_task_window_;
33
34 DISALLOW_COPY_AND_ASSIGN(DesktopTaskSwitchMetricRecorder);
35 };
36
37 } // namespace ash
38
39 #endif // ASH_METRICS_DESKTOP_TASK_SWITCH_METRIC_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698