| 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_ROOT_WINDOW_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_H_ | 6 #define UI_AURA_ROOT_WINDOW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // Clips the cursor movement to the root_window. | 133 // Clips the cursor movement to the root_window. |
| 134 bool ConfineCursorToWindow(); | 134 bool ConfineCursorToWindow(); |
| 135 | 135 |
| 136 // Draws the necessary set of windows. | 136 // Draws the necessary set of windows. |
| 137 void Draw(); | 137 void Draw(); |
| 138 | 138 |
| 139 // Draw the whole screen. | 139 // Draw the whole screen. |
| 140 void ScheduleFullDraw(); | 140 void ScheduleFullDraw(); |
| 141 | 141 |
| 142 // Handles a |native_event| event. Returns true if handled. |
| 143 bool DispatchNativeEvent(const base::NativeEvent& native_event); |
| 144 |
| 142 // Handles a mouse event. Returns true if handled. | 145 // Handles a mouse event. Returns true if handled. |
| 143 bool DispatchMouseEvent(MouseEvent* event); | 146 bool DispatchMouseEvent(MouseEvent* event); |
| 144 | 147 |
| 145 // Handles a key event. Returns true if handled. | 148 // Handles a key event. Returns true if handled. |
| 146 bool DispatchKeyEvent(KeyEvent* event); | 149 bool DispatchKeyEvent(KeyEvent* event); |
| 147 | 150 |
| 148 // Handles a scroll event. Returns true if handled. | 151 // Handles a scroll event. Returns true if handled. |
| 149 bool DispatchScrollEvent(ScrollEvent* event); | 152 bool DispatchScrollEvent(ScrollEvent* event); |
| 150 | 153 |
| 151 // Handles a touch event. Returns true if handled. | 154 // Handles a touch event. Returns true if handled. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 171 | 174 |
| 172 // Invoked when |window|'s tranfrom has changed. |contained_mouse| | 175 // Invoked when |window|'s tranfrom has changed. |contained_mouse| |
| 173 // indicates if the bounds before change contained the | 176 // indicates if the bounds before change contained the |
| 174 // |last_moust_location()|. | 177 // |last_moust_location()|. |
| 175 void OnWindowTransformed(Window* window, bool contained_mouse); | 178 void OnWindowTransformed(Window* window, bool contained_mouse); |
| 176 | 179 |
| 177 // Invoked when the keyboard mapping (in X11 terms: the mapping between | 180 // Invoked when the keyboard mapping (in X11 terms: the mapping between |
| 178 // keycodes and keysyms) has changed. | 181 // keycodes and keysyms) has changed. |
| 179 void OnKeyboardMappingChanged(); | 182 void OnKeyboardMappingChanged(); |
| 180 | 183 |
| 184 // Invoked when the cursor has changed. |
| 185 void OnCursorChanged(ui::PlatformCursor cursor); |
| 186 |
| 181 // The system windowing system has sent a request that we close our window. | 187 // The system windowing system has sent a request that we close our window. |
| 182 void OnRootWindowHostClosed(); | 188 void OnRootWindowHostClosed(); |
| 183 | 189 |
| 184 // Add/remove observer. There is no need to remove the observer if | 190 // Add/remove observer. There is no need to remove the observer if |
| 185 // the root window is being deleted. In particular, you SHOULD NOT remove | 191 // the root window is being deleted. In particular, you SHOULD NOT remove |
| 186 // in |WindowObserver::OnWindowDestroying| of the observer observing | 192 // in |WindowObserver::OnWindowDestroying| of the observer observing |
| 187 // the root window because it is too late to remove it. | 193 // the root window because it is too late to remove it. |
| 188 void AddRootWindowObserver(RootWindowObserver* observer); | 194 void AddRootWindowObserver(RootWindowObserver* observer); |
| 189 void RemoveRootWindowObserver(RootWindowObserver* observer); | 195 void RemoveRootWindowObserver(RootWindowObserver* observer); |
| 190 | 196 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 208 ui::GestureRecognizer* gesture_recognizer() const { | 214 ui::GestureRecognizer* gesture_recognizer() const { |
| 209 return gesture_recognizer_.get(); | 215 return gesture_recognizer_.get(); |
| 210 } | 216 } |
| 211 | 217 |
| 212 // Provided only for testing: | 218 // Provided only for testing: |
| 213 void SetGestureRecognizerForTesting(ui::GestureRecognizer* gr); | 219 void SetGestureRecognizerForTesting(ui::GestureRecognizer* gr); |
| 214 | 220 |
| 215 // Returns the accelerated widget from the RootWindowHost. | 221 // Returns the accelerated widget from the RootWindowHost. |
| 216 gfx::AcceleratedWidget GetAcceleratedWidget(); | 222 gfx::AcceleratedWidget GetAcceleratedWidget(); |
| 217 | 223 |
| 224 // Returns the accelerated widget used for events from the RootWindowHost. |
| 225 gfx::AcceleratedWidget GetAcceleratedWidgetUsedForEvents(); |
| 226 |
| 218 // Toggles the host's full screen state. | 227 // Toggles the host's full screen state. |
| 219 void ToggleFullScreen(); | 228 void ToggleFullScreen(); |
| 220 | 229 |
| 221 // These methods are used to defer the processing of mouse events related | 230 // These methods are used to defer the processing of mouse events related |
| 222 // to resize. A client (typically a RenderWidgetHostViewAura) can call | 231 // to resize. A client (typically a RenderWidgetHostViewAura) can call |
| 223 // HoldMouseMoves when an resize is initiated and then ReleaseMouseMoves | 232 // HoldMouseMoves when an resize is initiated and then ReleaseMouseMoves |
| 224 // once the resize is completed. | 233 // once the resize is completed. |
| 225 // | 234 // |
| 226 // More than one hold can be invoked and each hold must be cancelled by a | 235 // More than one hold can be invoked and each hold must be cancelled by a |
| 227 // release before we resume normal operation. | 236 // release before we resume normal operation. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 408 |
| 400 CompositorLock* compositor_lock_; | 409 CompositorLock* compositor_lock_; |
| 401 bool draw_on_compositor_unlock_; | 410 bool draw_on_compositor_unlock_; |
| 402 | 411 |
| 403 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 412 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 404 }; | 413 }; |
| 405 | 414 |
| 406 } // namespace aura | 415 } // namespace aura |
| 407 | 416 |
| 408 #endif // UI_AURA_ROOT_WINDOW_H_ | 417 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |