Chromium Code Reviews| 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_ |