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

Unified Diff: ui/wm/core/window_activation_pre_target_handler.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: ui/wm/core/window_activation_pre_target_handler.h
diff --git a/ui/wm/core/window_activation_pre_target_handler.h b/ui/wm/core/window_activation_pre_target_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..211926e6227f0a89cf44f158079382015b74582d
--- /dev/null
+++ b/ui/wm/core/window_activation_pre_target_handler.h
@@ -0,0 +1,49 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_
+#define UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "ui/events/event_handler.h"
+#include "ui/wm/wm_export.h"
+
+namespace aura {
+namespace client {
+class ActivationClient;
+} // namespace client
+} // namespace aura
+
+namespace wm {
+
+class ActivationClient;
+class WindowActivationPreTargetHandlerObserver;
+
+class WM_EXPORT WindowActivationPreTargetHandler : public ui::EventHandler {
tdanderson 2015/05/26 21:13:52 How about WindowActivationEventHandler?
+ public:
+ explicit WindowActivationPreTargetHandler(
+ aura::client::ActivationClient* activation_client);
+ ~WindowActivationPreTargetHandler() override;
+
+ void AddObserver(WindowActivationPreTargetHandlerObserver* observer);
+ void RemoveObserver(WindowActivationPreTargetHandlerObserver* observer);
+
+ // ui::EventHandler:
+ void OnMouseEvent(ui::MouseEvent* event) override;
+ void OnGestureEvent(ui::GestureEvent* event) override;
+
+ private:
+ aura::client::ActivationClient* activation_client_;
+
+ ObserverList<WindowActivationPreTargetHandlerObserver> observers_;
+
+ void ActivateWindowFromEvent(ui::Event* event);
tdanderson 2015/05/26 21:13:52 nit: members below methods
+
+ DISALLOW_COPY_AND_ASSIGN(WindowActivationPreTargetHandler);
+};
+
+} // namespace wm
+
+#endif // UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698