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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // whether the queued event was processed by the window or not. | 173 // whether the queued event was processed by the window or not. |
174 void AdvanceQueuedTouchEvent(Window* window, bool processed); | 174 void AdvanceQueuedTouchEvent(Window* window, bool processed); |
175 | 175 |
176 GestureRecognizer* gesture_recognizer() const { | 176 GestureRecognizer* gesture_recognizer() const { |
177 return gesture_recognizer_.get(); | 177 return gesture_recognizer_.get(); |
178 } | 178 } |
179 | 179 |
180 // Provided only for testing: | 180 // Provided only for testing: |
181 void SetGestureRecognizerForTesting(GestureRecognizer* gr); | 181 void SetGestureRecognizerForTesting(GestureRecognizer* gr); |
182 | 182 |
183 // Overridden from Window: | |
184 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; | |
185 | |
186 #if !defined(NDEBUG) | 183 #if !defined(NDEBUG) |
187 // Toggles the host's full screen state. | 184 // Toggles the host's full screen state. |
188 void ToggleFullScreen(); | 185 void ToggleFullScreen(); |
189 #endif | 186 #endif |
190 | 187 |
| 188 // Overridden from Window: |
| 189 virtual RootWindow* GetRootWindow() OVERRIDE; |
| 190 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; |
| 191 |
191 // Overridden from ui::CompositorDelegate: | 192 // Overridden from ui::CompositorDelegate: |
192 virtual void ScheduleDraw() OVERRIDE; | 193 virtual void ScheduleDraw() OVERRIDE; |
193 | 194 |
194 // Overridden from Window: | 195 // Overridden from Window: |
195 virtual void OnWindowAttachedToRootWindow( | 196 virtual void OnWindowAttachedToRootWindow( |
196 Window* window) OVERRIDE; | 197 Window* window) OVERRIDE; |
197 virtual void OnWindowDetachingFromRootWindow( | 198 virtual void OnWindowDetachingFromRootWindow( |
198 Window* window) OVERRIDE; | 199 Window* window) OVERRIDE; |
199 | 200 |
200 private: | 201 private: |
201 RootWindow(); | 202 RootWindow(); |
202 virtual ~RootWindow(); | 203 virtual ~RootWindow(); |
203 | 204 |
204 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 205 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
205 // sending exited and entered events as its value changes. | 206 // sending exited and entered events as its value changes. |
206 void HandleMouseMoved(const MouseEvent& event, Window* target); | 207 void HandleMouseMoved(const MouseEvent& event, Window* target); |
207 | 208 |
208 bool ProcessMouseEvent(Window* target, MouseEvent* event); | 209 bool ProcessMouseEvent(Window* target, MouseEvent* event); |
209 bool ProcessKeyEvent(Window* target, KeyEvent* event); | 210 bool ProcessKeyEvent(Window* target, KeyEvent* event); |
210 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); | 211 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); |
211 ui::GestureStatus ProcessGestureEvent(Window* target, GestureEvent* event); | 212 ui::GestureStatus ProcessGestureEvent(Window* target, GestureEvent* event); |
212 bool ProcessGestures(GestureRecognizer::Gestures* gestures); | 213 bool ProcessGestures(GestureRecognizer::Gestures* gestures); |
213 | 214 |
214 // Overridden from Window: | 215 // Overridden from Window: |
215 virtual bool CanFocus() const OVERRIDE; | 216 virtual bool CanFocus() const OVERRIDE; |
216 virtual bool CanReceiveEvents() const OVERRIDE; | 217 virtual bool CanReceiveEvents() const OVERRIDE; |
217 virtual internal::FocusManager* GetFocusManager() OVERRIDE; | 218 virtual internal::FocusManager* GetFocusManager() OVERRIDE; |
218 virtual RootWindow* GetRootWindow() OVERRIDE; | |
219 | 219 |
220 // Overridden from ui::LayerAnimationObserver: | 220 // Overridden from ui::LayerAnimationObserver: |
221 virtual void OnLayerAnimationEnded( | 221 virtual void OnLayerAnimationEnded( |
222 const ui::LayerAnimationSequence* animation) OVERRIDE; | 222 const ui::LayerAnimationSequence* animation) OVERRIDE; |
223 virtual void OnLayerAnimationScheduled( | 223 virtual void OnLayerAnimationScheduled( |
224 const ui::LayerAnimationSequence* animation) OVERRIDE; | 224 const ui::LayerAnimationSequence* animation) OVERRIDE; |
225 virtual void OnLayerAnimationAborted( | 225 virtual void OnLayerAnimationAborted( |
226 const ui::LayerAnimationSequence* animation) OVERRIDE; | 226 const ui::LayerAnimationSequence* animation) OVERRIDE; |
227 | 227 |
228 // Overridden from FocusManager: | 228 // Overridden from FocusManager: |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 scoped_ptr<GestureRecognizer> gesture_recognizer_; | 289 scoped_ptr<GestureRecognizer> gesture_recognizer_; |
290 | 290 |
291 bool synthesize_mouse_move_; | 291 bool synthesize_mouse_move_; |
292 | 292 |
293 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 293 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
294 }; | 294 }; |
295 | 295 |
296 } // namespace aura | 296 } // namespace aura |
297 | 297 |
298 #endif // UI_AURA_ROOT_WINDOW_H_ | 298 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |