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_ROOT_VIEW_H_ | 5 #ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 105 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
106 virtual void OnMouseCaptureLost() OVERRIDE; | 106 virtual void OnMouseCaptureLost() OVERRIDE; |
107 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; | 107 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
108 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 108 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
109 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; | 109 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; |
110 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; | 110 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; |
111 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 111 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
112 virtual void UpdateParentLayer() OVERRIDE; | 112 virtual void UpdateParentLayer() OVERRIDE; |
113 | 113 |
114 protected: | 114 protected: |
115 // TODO(tdanderson): Remove RootView::DispatchGestureEvent() once | |
116 // its targeting and dispatch logic has been moved | |
117 // elsewhere. See crbug.com/348083. | |
118 virtual void DispatchGestureEvent(ui::GestureEvent* event); | |
119 | |
120 // Overridden from View: | 115 // Overridden from View: |
121 virtual void ViewHierarchyChanged( | 116 virtual void ViewHierarchyChanged( |
122 const ViewHierarchyChangedDetails& details) OVERRIDE; | 117 const ViewHierarchyChangedDetails& details) OVERRIDE; |
123 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | 118 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; |
124 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 119 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
125 virtual gfx::Vector2d CalculateOffsetToAncestorWithLayer( | 120 virtual gfx::Vector2d CalculateOffsetToAncestorWithLayer( |
126 ui::Layer** layer_parent) OVERRIDE; | 121 ui::Layer** layer_parent) OVERRIDE; |
127 virtual View::DragInfo* GetDragInfo() OVERRIDE; | 122 virtual View::DragInfo* GetDragInfo() OVERRIDE; |
128 | 123 |
129 private: | 124 private: |
130 friend class ::views::View; | 125 friend class ::views::View; |
131 friend class ::views::Widget; | 126 friend class ::views::Widget; |
132 friend class ::views::test::WidgetTest; | 127 friend class ::views::test::WidgetTest; |
133 | 128 |
134 // Input --------------------------------------------------------------------- | 129 // Input --------------------------------------------------------------------- |
135 | 130 |
131 // TODO(tdanderson): Remove RootView::DispatchGestureEvent() once | |
132 // its targeting and dispatch logic has been moved | |
133 // elsewhere. See crbug.com/348083. | |
134 void DispatchGestureEvent(ui::GestureEvent* event); | |
sky
2014/07/16 19:21:28
nit: move implementation to match new position.
tdanderson
2014/07/16 20:50:50
Done.
| |
135 | |
136 // Update the cursor given a mouse event. This is called by non mouse_move | 136 // Update the cursor given a mouse event. This is called by non mouse_move |
137 // event handlers to honor the cursor desired by views located under the | 137 // event handlers to honor the cursor desired by views located under the |
138 // cursor during drag operations. The location of the mouse should be in the | 138 // cursor during drag operations. The location of the mouse should be in the |
139 // current coordinate system (i.e. any necessary transformation should be | 139 // current coordinate system (i.e. any necessary transformation should be |
140 // applied to the point prior to calling this). | 140 // applied to the point prior to calling this). |
141 void UpdateCursor(const ui::MouseEvent& event); | 141 void UpdateCursor(const ui::MouseEvent& event); |
142 | 142 |
143 // Updates the last_mouse_* fields from e. The location of the mouse should be | 143 // Updates the last_mouse_* fields from e. The location of the mouse should be |
144 // in the current coordinate system (i.e. any necessary transformation should | 144 // in the current coordinate system (i.e. any necessary transformation should |
145 // be applied to the point prior to calling this). | 145 // be applied to the point prior to calling this). |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 // Tracks drag state for a view. | 221 // Tracks drag state for a view. |
222 View::DragInfo drag_info_; | 222 View::DragInfo drag_info_; |
223 | 223 |
224 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); | 224 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); |
225 }; | 225 }; |
226 | 226 |
227 } // namespace internal | 227 } // namespace internal |
228 } // namespace views | 228 } // namespace views |
229 | 229 |
230 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 230 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
OLD | NEW |