| 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_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Returns the non-client component (see ui/base/hit_test.h) containing | 103 // Returns the non-client component (see ui/base/hit_test.h) containing |
| 104 // |point|, in client coordinates. | 104 // |point|, in client coordinates. |
| 105 virtual int GetNonClientComponent(const gfx::Point& point) = 0; | 105 virtual int GetNonClientComponent(const gfx::Point& point) = 0; |
| 106 | 106 |
| 107 // Mouse and key event handlers. | 107 // Mouse and key event handlers. |
| 108 virtual bool OnKeyEvent(const ui::KeyEvent& event) = 0; | 108 virtual bool OnKeyEvent(const ui::KeyEvent& event) = 0; |
| 109 virtual bool OnMouseEvent(const ui::MouseEvent& event) = 0; | 109 virtual bool OnMouseEvent(const ui::MouseEvent& event) = 0; |
| 110 virtual void OnMouseCaptureLost() = 0; | 110 virtual void OnMouseCaptureLost() = 0; |
| 111 virtual ui::TouchStatus OnTouchEvent(const ui::TouchEvent& event) = 0; | 111 virtual ui::TouchStatus OnTouchEvent(const ui::TouchEvent& event) = 0; |
| 112 virtual ui::GestureStatus OnGestureEvent(const ui::GestureEvent& event) = 0; | 112 virtual ui::EventResult OnGestureEvent(const ui::GestureEvent& event) = 0; |
| 113 | 113 |
| 114 // Runs the specified native command. Returns true if the command is handled. | 114 // Runs the specified native command. Returns true if the command is handled. |
| 115 virtual bool ExecuteCommand(int command_id) = 0; | 115 virtual bool ExecuteCommand(int command_id) = 0; |
| 116 | 116 |
| 117 // Returns the input method of the widget this delegate is associated with. | 117 // Returns the input method of the widget this delegate is associated with. |
| 118 // Note that this does not use the top level widget, so may return NULL | 118 // Note that this does not use the top level widget, so may return NULL |
| 119 // if the widget doesn't have input method. | 119 // if the widget doesn't have input method. |
| 120 virtual InputMethod* GetInputMethodDirect() = 0; | 120 virtual InputMethod* GetInputMethodDirect() = 0; |
| 121 | 121 |
| 122 // Returns the child Layers of the Widgets layer that were created by Views. | 122 // Returns the child Layers of the Widgets layer that were created by Views. |
| 123 virtual const std::vector<ui::Layer*>& GetRootLayers() = 0; | 123 virtual const std::vector<ui::Layer*>& GetRootLayers() = 0; |
| 124 | 124 |
| 125 // Returns true if window has a hit-test mask. | 125 // Returns true if window has a hit-test mask. |
| 126 virtual bool HasHitTestMask() const = 0; | 126 virtual bool HasHitTestMask() const = 0; |
| 127 | 127 |
| 128 // Provides the hit-test mask if HasHitTestMask above returns true. | 128 // Provides the hit-test mask if HasHitTestMask above returns true. |
| 129 virtual void GetHitTestMask(gfx::Path* mask) const = 0; | 129 virtual void GetHitTestMask(gfx::Path* mask) const = 0; |
| 130 | 130 |
| 131 // | 131 // |
| 132 virtual Widget* AsWidget() = 0; | 132 virtual Widget* AsWidget() = 0; |
| 133 virtual const Widget* AsWidget() const = 0; | 133 virtual const Widget* AsWidget() const = 0; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace internal | 136 } // namespace internal |
| 137 } // namespace views | 137 } // namespace views |
| 138 | 138 |
| 139 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 139 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
| OLD | NEW |