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 UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_ | |
6 #define UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/observer_list.h" | |
10 #include "ui/events/event_handler.h" | |
11 #include "ui/wm/wm_export.h" | |
12 | |
13 namespace aura { | |
14 namespace client { | |
15 class ActivationClient; | |
16 } // namespace client | |
17 } // namespace aura | |
18 | |
19 namespace wm { | |
20 | |
21 class ActivationClient; | |
22 class WindowActivationPreTargetHandlerObserver; | |
23 | |
24 class WM_EXPORT WindowActivationPreTargetHandler : public ui::EventHandler { | |
tdanderson
2015/05/26 21:13:52
How about WindowActivationEventHandler?
| |
25 public: | |
26 explicit WindowActivationPreTargetHandler( | |
27 aura::client::ActivationClient* activation_client); | |
28 ~WindowActivationPreTargetHandler() override; | |
29 | |
30 void AddObserver(WindowActivationPreTargetHandlerObserver* observer); | |
31 void RemoveObserver(WindowActivationPreTargetHandlerObserver* observer); | |
32 | |
33 // ui::EventHandler: | |
34 void OnMouseEvent(ui::MouseEvent* event) override; | |
35 void OnGestureEvent(ui::GestureEvent* event) override; | |
36 | |
37 private: | |
38 aura::client::ActivationClient* activation_client_; | |
39 | |
40 ObserverList<WindowActivationPreTargetHandlerObserver> observers_; | |
41 | |
42 void ActivateWindowFromEvent(ui::Event* event); | |
tdanderson
2015/05/26 21:13:52
nit: members below methods
| |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(WindowActivationPreTargetHandler); | |
45 }; | |
46 | |
47 } // namespace wm | |
48 | |
49 #endif // UI_WM_CORE_WINDOW_ACTIVATION_PRE_TARGET_HANDLER_H_ | |
OLD | NEW |