| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_WIDGET_ROOT_VIEW_H_ | 5 #ifndef VIEWS_WIDGET_ROOT_VIEW_H_ |
| 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // Sets the "contents view" of the RootView. This is the single child view | 52 // Sets the "contents view" of the RootView. This is the single child view |
| 53 // that is responsible for laying out the contents of the widget. | 53 // that is responsible for laying out the contents of the widget. |
| 54 void SetContentsView(View* contents_view); | 54 void SetContentsView(View* contents_view); |
| 55 | 55 |
| 56 // Called when parent of the host changed. | 56 // Called when parent of the host changed. |
| 57 void NotifyNativeViewHierarchyChanged(bool attached, | 57 void NotifyNativeViewHierarchyChanged(bool attached, |
| 58 gfx::NativeView native_view); | 58 gfx::NativeView native_view); |
| 59 | 59 |
| 60 // Input --------------------------------------------------------------------- | 60 // Input --------------------------------------------------------------------- |
| 61 | 61 |
| 62 // Invoked By the Widget if the mouse drag is interrupted by | |
| 63 // the system. Invokes OnMouseReleased with a value of true for canceled. | |
| 64 void ProcessMouseDragCanceled(); | |
| 65 | |
| 66 // Process a key event. Send the event to the focused view and up the focus | 62 // Process a key event. Send the event to the focused view and up the focus |
| 67 // path, and finally to the default keyboard handler, until someone consumes | 63 // path, and finally to the default keyboard handler, until someone consumes |
| 68 // it. Returns whether anyone consumed the event. | 64 // it. Returns whether anyone consumed the event. |
| 69 bool ProcessKeyEvent(const KeyEvent& event); | 65 bool ProcessKeyEvent(const KeyEvent& event); |
| 70 | 66 |
| 71 #if defined(TOUCH_UI) && defined(UNIT_TEST) | 67 #if defined(TOUCH_UI) && defined(UNIT_TEST) |
| 72 // For unit testing purposes, we use this method to set a mock | 68 // For unit testing purposes, we use this method to set a mock |
| 73 // GestureManager | 69 // GestureManager |
| 74 void SetGestureManager(GestureManager* g) { gesture_manager_ = g; } | 70 void SetGestureManager(GestureManager* g) { gesture_manager_ = g; } |
| 75 #endif | 71 #endif |
| (...skipping 23 matching lines...) Expand all Loading... |
| 99 virtual View* GetFocusTraversableParentView() OVERRIDE; | 95 virtual View* GetFocusTraversableParentView() OVERRIDE; |
| 100 | 96 |
| 101 // Overridden from View: | 97 // Overridden from View: |
| 102 virtual const Widget* GetWidget() const OVERRIDE; | 98 virtual const Widget* GetWidget() const OVERRIDE; |
| 103 virtual Widget* GetWidget() OVERRIDE; | 99 virtual Widget* GetWidget() OVERRIDE; |
| 104 virtual bool IsVisibleInRootView() const OVERRIDE; | 100 virtual bool IsVisibleInRootView() const OVERRIDE; |
| 105 virtual std::string GetClassName() const OVERRIDE; | 101 virtual std::string GetClassName() const OVERRIDE; |
| 106 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 102 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
| 107 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 103 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
| 108 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 104 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
| 109 virtual void OnMouseReleased(const MouseEvent& event, bool canceled) OVERRIDE; | 105 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 106 virtual void OnMouseCaptureLost() OVERRIDE; |
| 110 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 107 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; |
| 111 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 108 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
| 112 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; | 109 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; |
| 113 #if defined(TOUCH_UI) | 110 #if defined(TOUCH_UI) |
| 114 virtual TouchStatus OnTouchEvent(const TouchEvent& event) OVERRIDE; | 111 virtual TouchStatus OnTouchEvent(const TouchEvent& event) OVERRIDE; |
| 115 #endif | 112 #endif |
| 116 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; | 113 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; |
| 117 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 114 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 118 | 115 |
| 119 #if defined(TOUCH_UI) | 116 #if defined(TOUCH_UI) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // Drag and drop ------------------------------------------------------------- | 209 // Drag and drop ------------------------------------------------------------- |
| 213 | 210 |
| 214 // Tracks drag state for a view. | 211 // Tracks drag state for a view. |
| 215 View::DragInfo drag_info; | 212 View::DragInfo drag_info; |
| 216 | 213 |
| 217 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); | 214 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); |
| 218 }; | 215 }; |
| 219 } // namespace views | 216 } // namespace views |
| 220 | 217 |
| 221 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ | 218 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ |
| OLD | NEW |