| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_VIEW_TARGETER_H_ | 5 #ifndef UI_VIEWS_VIEW_TARGETER_H_ |
| 6 #define UI_VIEWS_VIEW_TARGETER_H_ | 6 #define UI_VIEWS_VIEW_TARGETER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/events/event_targeter.h" | 9 #include "ui/events/event_targeter.h" |
| 10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Rect; | 13 class Rect; |
| 14 } // namespace gfx | 14 } // namespace gfx |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 class GestureEvent; | 17 class GestureEvent; |
| 18 class KeyEvent; | 18 class KeyEvent; |
| 19 class ScrollEvent; | 19 class ScrollEvent; |
| 20 } // namespace ui | 20 } // namespace ui |
| 21 | 21 |
| 22 namespace views { | 22 namespace views { |
| 23 | 23 |
| 24 namespace internal { | |
| 25 class RootView; | |
| 26 } // namespace internal | |
| 27 | |
| 28 class View; | 24 class View; |
| 29 class ViewTargeterDelegate; | 25 class ViewTargeterDelegate; |
| 30 | 26 |
| 31 // A ViewTargeter is installed on a View that wishes to use the custom | 27 // A ViewTargeter is installed on a View that wishes to use the custom |
| 32 // hit-testing or event-targeting behaviour defined by |delegate|. | 28 // hit-testing or event-targeting behaviour defined by |delegate|. |
| 33 class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter { | 29 class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter { |
| 34 public: | 30 public: |
| 35 explicit ViewTargeter(ViewTargeterDelegate* delegate); | 31 explicit ViewTargeter(ViewTargeterDelegate* delegate); |
| 36 ~ViewTargeter() override; | 32 ~ViewTargeter() override; |
| 37 | 33 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 // ViewTargeter does not own the |delegate_|, but |delegate_| must | 57 // ViewTargeter does not own the |delegate_|, but |delegate_| must |
| 62 // outlive the targeter. | 58 // outlive the targeter. |
| 63 ViewTargeterDelegate* delegate_; | 59 ViewTargeterDelegate* delegate_; |
| 64 | 60 |
| 65 DISALLOW_COPY_AND_ASSIGN(ViewTargeter); | 61 DISALLOW_COPY_AND_ASSIGN(ViewTargeter); |
| 66 }; | 62 }; |
| 67 | 63 |
| 68 } // namespace views | 64 } // namespace views |
| 69 | 65 |
| 70 #endif // UI_VIEWS_VIEW_TARGETER_H_ | 66 #endif // UI_VIEWS_VIEW_TARGETER_H_ |
| OLD | NEW |