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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // after SetCapture(). ReleaseCapture() implicitly removes any confines set | 129 // after SetCapture(). ReleaseCapture() implicitly removes any confines set |
130 // using this function. Returns true if successful. | 130 // using this function. Returns true if successful. |
131 bool ConfineCursorToWindow(); | 131 bool ConfineCursorToWindow(); |
132 | 132 |
133 // Draws the necessary set of windows. | 133 // Draws the necessary set of windows. |
134 void Draw(); | 134 void Draw(); |
135 | 135 |
136 // Draw the whole screen. | 136 // Draw the whole screen. |
137 void ScheduleFullDraw(); | 137 void ScheduleFullDraw(); |
138 | 138 |
| 139 // Used to enable or disable the native window borders on a window. |
| 140 void SetUseHostWindowBorders(bool use_os_borders); |
| 141 |
139 // Handles a mouse event. Returns true if handled. | 142 // Handles a mouse event. Returns true if handled. |
140 bool DispatchMouseEvent(MouseEvent* event); | 143 bool DispatchMouseEvent(MouseEvent* event); |
141 | 144 |
142 // Handles a key event. Returns true if handled. | 145 // Handles a key event. Returns true if handled. |
143 bool DispatchKeyEvent(KeyEvent* event); | 146 bool DispatchKeyEvent(KeyEvent* event); |
144 | 147 |
145 // Handles a scroll event. Returns true if handled. | 148 // Handles a scroll event. Returns true if handled. |
146 bool DispatchScrollEvent(ScrollEvent* event); | 149 bool DispatchScrollEvent(ScrollEvent* event); |
147 | 150 |
148 // Handles a touch event. Returns true if handled. | 151 // Handles a touch event. Returns true if handled. |
149 bool DispatchTouchEvent(TouchEvent* event); | 152 bool DispatchTouchEvent(TouchEvent* event); |
150 | 153 |
151 // Handles a gesture event. Returns true if handled. Unlike the other | 154 // Handles a gesture event. Returns true if handled. Unlike the other |
152 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture | 155 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture |
153 // events are dispatched from GestureRecognizer instead of RootWindowHost. | 156 // events are dispatched from GestureRecognizer instead of RootWindowHost. |
154 bool DispatchGestureEvent(GestureEvent* event); | 157 bool DispatchGestureEvent(GestureEvent* event); |
155 | 158 |
| 159 // Handles when we're told that the operating system should move the |
| 160 // window. Returns true if handled. |
| 161 bool DispatchHostWindowDragMovement(int hittest, MouseEvent* event); |
| 162 |
156 // Called when the host changes size. | 163 // Called when the host changes size. |
157 void OnHostResized(const gfx::Size& size_in_pixel); | 164 void OnHostResized(const gfx::Size& size_in_pixel); |
158 | 165 |
159 // Invoked when |window| is being destroyed. | 166 // Invoked when |window| is being destroyed. |
160 void OnWindowDestroying(Window* window); | 167 void OnWindowDestroying(Window* window); |
161 | 168 |
162 // Invoked when |window|'s bounds have changed. |contained_mouse| indicates if | 169 // Invoked when |window|'s bounds have changed. |contained_mouse| indicates if |
163 // the bounds before change contained the |last_moust_location()|. | 170 // the bounds before change contained the |last_moust_location()|. |
164 void OnWindowBoundsChanged(Window* window, bool contained_mouse); | 171 void OnWindowBoundsChanged(Window* window, bool contained_mouse); |
165 | 172 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 bool draw_on_compositor_unlock_; | 410 bool draw_on_compositor_unlock_; |
404 | 411 |
405 int draw_trace_count_; | 412 int draw_trace_count_; |
406 | 413 |
407 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 414 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
408 }; | 415 }; |
409 | 416 |
410 } // namespace aura | 417 } // namespace aura |
411 | 418 |
412 #endif // UI_AURA_ROOT_WINDOW_H_ | 419 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |