Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_SCREEN_EVENT_TASK_SWITCH_METRIC_RECORDER_H_ | |
| 6 #define ASH_METRICS_SCREEN_EVENT_TASK_SWITCH_METRIC_RECORDER_H_ | |
| 7 | |
| 8 #include "ash/ash_export.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "ui/wm/core/window_activation_pre_target_handler_observer.h" | |
| 11 #include "ui/wm/public/activation_change_observer.h" | |
| 12 | |
| 13 namespace aura { | |
| 14 class Window; | |
| 15 } // namespace aura | |
| 16 | |
| 17 namespace ash { | |
| 18 | |
| 19 class UserMetricsRecorder; | |
| 20 | |
| 21 class ASH_EXPORT ScreenEventTaskSwitchMetricRecorder | |
| 22 : public wm::WindowActivationPreTargetHandlerObserver { | |
| 23 public: | |
| 24 explicit ScreenEventTaskSwitchMetricRecorder( | |
| 25 UserMetricsRecorder* user_metrics_recorder); | |
| 26 ~ScreenEventTaskSwitchMetricRecorder() override; | |
| 27 | |
| 28 // wm::WindowActivationPreTargetHandlerObserver: | |
| 29 void BeforeWindowActivatedByPreTargetHandler() override; | |
| 30 void OnWindowActivatedByPreTargetHandler(aura::Window* gained_active, | |
| 31 aura::Window* lost_active) override; | |
| 32 | |
| 33 private: | |
| 34 UserMetricsRecorder* user_metrics_recorder_; | |
| 35 aura::Window* active_window_before_activation_ = nullptr; | |
|
tdanderson
2015/05/26 21:13:52
initialize to null in constructor
bruthig
2015/06/03 21:59:31
Done.
| |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(ScreenEventTaskSwitchMetricRecorder); | |
| 38 }; | |
| 39 | |
| 40 } // namespace ash | |
| 41 | |
| 42 #endif // ASH_METRICS_SCREEN_EVENT_TASK_SWITCH_METRIC_RECORDER_H_ | |
| OLD | NEW |