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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 public ui::GestureEventHelper, | 82 public ui::GestureEventHelper, |
83 public ui::LayerAnimationObserver, | 83 public ui::LayerAnimationObserver, |
84 public aura::client::CaptureDelegate, | 84 public aura::client::CaptureDelegate, |
85 public aura::RootWindowHostDelegate { | 85 public aura::RootWindowHostDelegate { |
86 public: | 86 public: |
87 explicit RootWindow(const gfx::Rect& initial_bounds); | 87 explicit RootWindow(const gfx::Rect& initial_bounds); |
88 virtual ~RootWindow(); | 88 virtual ~RootWindow(); |
89 | 89 |
90 static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget); | 90 static RootWindow* GetForAcceleratedWidget(gfx::AcceleratedWidget widget); |
91 | 91 |
92 static void set_hide_host_cursor(bool hide) { | |
93 hide_host_cursor_ = hide; | |
94 } | |
95 static bool hide_host_cursor() { | |
96 return hide_host_cursor_; | |
97 } | |
98 | |
99 ui::Compositor* compositor() { return compositor_.get(); } | 92 ui::Compositor* compositor() { return compositor_.get(); } |
100 gfx::NativeCursor last_cursor() const { return last_cursor_; } | 93 gfx::NativeCursor last_cursor() const { return last_cursor_; } |
101 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } | 94 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } |
102 bool cursor_shown() const { return cursor_shown_; } | 95 bool cursor_shown() const { return cursor_shown_; } |
103 | 96 |
104 void set_focus_manager(FocusManager* focus_manager) { | 97 void set_focus_manager(FocusManager* focus_manager) { |
105 focus_manager_ = focus_manager; | 98 focus_manager_ = focus_manager; |
106 } | 99 } |
107 | 100 |
108 // Initializes the root window. | 101 // Initializes the root window. |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // current mouse location. | 337 // current mouse location. |
345 void SynthesizeMouseMoveEvent(); | 338 void SynthesizeMouseMoveEvent(); |
346 | 339 |
347 // Called by CompositorLock. | 340 // Called by CompositorLock. |
348 void UnlockCompositor(); | 341 void UnlockCompositor(); |
349 | 342 |
350 scoped_ptr<ui::Compositor> compositor_; | 343 scoped_ptr<ui::Compositor> compositor_; |
351 | 344 |
352 scoped_ptr<RootWindowHost> host_; | 345 scoped_ptr<RootWindowHost> host_; |
353 | 346 |
354 // If set before the RootWindow is created, the cursor will be drawn within | |
355 // the Aura root window but hidden outside of it, and it'll remain hidden | |
356 // after the Aura window is closed. | |
357 static bool hide_host_cursor_; | |
358 | |
359 // Used to schedule painting. | 347 // Used to schedule painting. |
360 base::WeakPtrFactory<RootWindow> schedule_paint_factory_; | 348 base::WeakPtrFactory<RootWindow> schedule_paint_factory_; |
361 | 349 |
362 // Use to post mouse move event. | 350 // Use to post mouse move event. |
363 base::WeakPtrFactory<RootWindow> event_factory_; | 351 base::WeakPtrFactory<RootWindow> event_factory_; |
364 | 352 |
365 // ui::EventFlags containing the current state of the mouse buttons. | 353 // ui::EventFlags containing the current state of the mouse buttons. |
366 int mouse_button_flags_; | 354 int mouse_button_flags_; |
367 | 355 |
368 // Touch ids that are currently down. | 356 // Touch ids that are currently down. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 389 |
402 CompositorLock* compositor_lock_; | 390 CompositorLock* compositor_lock_; |
403 bool draw_on_compositor_unlock_; | 391 bool draw_on_compositor_unlock_; |
404 | 392 |
405 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 393 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
406 }; | 394 }; |
407 | 395 |
408 } // namespace aura | 396 } // namespace aura |
409 | 397 |
410 #endif // UI_AURA_ROOT_WINDOW_H_ | 398 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |