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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // coordinates. This may return a point outside the root window's bounds. | 231 // coordinates. This may return a point outside the root window's bounds. |
232 gfx::Point GetLastMouseLocationInRoot() const; | 232 gfx::Point GetLastMouseLocationInRoot() const; |
233 | 233 |
234 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. | 234 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. |
235 bool QueryMouseLocationForTest(gfx::Point* point) const; | 235 bool QueryMouseLocationForTest(gfx::Point* point) const; |
236 | 236 |
237 void SetRootWindowTransformer(scoped_ptr<RootWindowTransformer> transformer); | 237 void SetRootWindowTransformer(scoped_ptr<RootWindowTransformer> transformer); |
238 gfx::Transform GetRootTransform() const; | 238 gfx::Transform GetRootTransform() const; |
239 | 239 |
240 // Overridden from Window: | 240 // Overridden from Window: |
241 virtual RootWindow* GetRootWindow() OVERRIDE; | 241 virtual Window* GetRootWindow() OVERRIDE; |
242 virtual const RootWindow* GetRootWindow() const OVERRIDE; | 242 virtual const Window* GetRootWindow() const OVERRIDE; |
243 virtual void SetTransform(const gfx::Transform& transform) OVERRIDE; | 243 virtual void SetTransform(const gfx::Transform& transform) OVERRIDE; |
244 virtual bool CanFocus() const OVERRIDE; | 244 virtual bool CanFocus() const OVERRIDE; |
245 virtual bool CanReceiveEvents() const OVERRIDE; | 245 virtual bool CanReceiveEvents() const OVERRIDE; |
246 | 246 |
247 private: | 247 private: |
248 FRIEND_TEST_ALL_PREFIXES(RootWindowTest, KeepTranslatedEventInRoot); | 248 FRIEND_TEST_ALL_PREFIXES(RootWindowTest, KeepTranslatedEventInRoot); |
249 | 249 |
250 friend class Window; | 250 friend class Window; |
251 friend class TestScreen; | 251 friend class TestScreen; |
252 | 252 |
(...skipping 21 matching lines...) Expand all Loading... |
274 // |mouse_moved_handler_|. | 274 // |mouse_moved_handler_|. |
275 void DispatchMouseEnterOrExit(const ui::MouseEvent& event, | 275 void DispatchMouseEnterOrExit(const ui::MouseEvent& event, |
276 ui::EventType type); | 276 ui::EventType type); |
277 | 277 |
278 void ProcessEvent(Window* target, ui::Event* event); | 278 void ProcessEvent(Window* target, ui::Event* event); |
279 | 279 |
280 bool ProcessGestures(ui::GestureRecognizer::Gestures* gestures); | 280 bool ProcessGestures(ui::GestureRecognizer::Gestures* gestures); |
281 | 281 |
282 // Called when a Window is attached or detached from the RootWindow. | 282 // Called when a Window is attached or detached from the RootWindow. |
283 void OnWindowAddedToRootWindow(Window* window); | 283 void OnWindowAddedToRootWindow(Window* window); |
284 void OnWindowRemovedFromRootWindow(Window* window, RootWindow* new_root); | 284 void OnWindowRemovedFromRootWindow(Window* window, Window* new_root); |
285 | 285 |
286 // Called when a window becomes invisible, either by being removed | 286 // Called when a window becomes invisible, either by being removed |
287 // from root window hierarchy, via SetVisible(false) or being destroyed. | 287 // from root window hierarchy, via SetVisible(false) or being destroyed. |
288 // |reason| specifies what triggered the hiding. | 288 // |reason| specifies what triggered the hiding. |
289 void OnWindowHidden(Window* invisible, WindowHiddenReason reason); | 289 void OnWindowHidden(Window* invisible, WindowHiddenReason reason); |
290 | 290 |
291 // Cleans up the gesture recognizer for all windows in |window| (including | 291 // Cleans up the gesture recognizer for all windows in |window| (including |
292 // |window| itself). | 292 // |window| itself). |
293 void CleanupGestureRecognizerState(Window* window); | 293 void CleanupGestureRecognizerState(Window* window); |
294 | 294 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 base::WeakPtrFactory<RootWindow> held_event_factory_; | 406 base::WeakPtrFactory<RootWindow> held_event_factory_; |
407 | 407 |
408 base::WeakPtrFactory<RootWindow> repostable_event_factory_; | 408 base::WeakPtrFactory<RootWindow> repostable_event_factory_; |
409 | 409 |
410 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 410 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
411 }; | 411 }; |
412 | 412 |
413 } // namespace aura | 413 } // namespace aura |
414 | 414 |
415 #endif // UI_AURA_ROOT_WINDOW_H_ | 415 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |