| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AURA_WINDOW_DELEGATE_H_ | 5 #ifndef UI_AURA_WINDOW_DELEGATE_H_ |
| 6 #define UI_AURA_WINDOW_DELEGATE_H_ | 6 #define UI_AURA_WINDOW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 #include "ui/base/events.h" | 9 #include "ui/base/events.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0; | 47 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) = 0; |
| 48 | 48 |
| 49 // Returns the non-client component (see hit_test.h) containing |point|, in | 49 // Returns the non-client component (see hit_test.h) containing |point|, in |
| 50 // window coordinates. | 50 // window coordinates. |
| 51 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; | 51 virtual int GetNonClientComponent(const gfx::Point& point) const = 0; |
| 52 | 52 |
| 53 // Returns true if event handling should descend into |child|. |location| is | 53 // Returns true if event handling should descend into |child|. |location| is |
| 54 // in terms of the Window. | 54 // in terms of the Window. |
| 55 virtual bool ShouldDescendIntoChildForEventHandling( | 55 virtual bool ShouldDescendIntoChildForEventHandling( |
| 56 Window* child, | 56 Window* child, |
| 57 const gfx::Point& location) = 0; | 57 const gfx::Point& event_location, |
| 58 ui::EventType event_type) = 0; |
| 58 | 59 |
| 59 virtual bool OnMouseEvent(ui::MouseEvent* event) = 0; | 60 virtual bool OnMouseEvent(ui::MouseEvent* event) = 0; |
| 60 | 61 |
| 61 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) = 0; | 62 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) = 0; |
| 62 | 63 |
| 63 virtual ui::GestureStatus OnGestureEvent(ui::GestureEvent* event) = 0; | 64 virtual ui::GestureStatus OnGestureEvent(ui::GestureEvent* event) = 0; |
| 64 | 65 |
| 65 // Returns true of the window can be focused. | 66 // Returns true of the window can be focused. |
| 66 virtual bool CanFocus() = 0; | 67 virtual bool CanFocus() = 0; |
| 67 | 68 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // above returns true. | 101 // above returns true. |
| 101 virtual void GetHitTestMask(gfx::Path* mask) const = 0; | 102 virtual void GetHitTestMask(gfx::Path* mask) const = 0; |
| 102 | 103 |
| 103 protected: | 104 protected: |
| 104 virtual ~WindowDelegate() {} | 105 virtual ~WindowDelegate() {} |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace aura | 108 } // namespace aura |
| 108 | 109 |
| 109 #endif // UI_AURA_WINDOW_DELEGATE_H_ | 110 #endif // UI_AURA_WINDOW_DELEGATE_H_ |
| OLD | NEW |