| 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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class TouchEvent; | 43 class TouchEvent; |
| 44 class GestureEvent; | 44 class GestureEvent; |
| 45 | 45 |
| 46 // RootWindow is responsible for hosting a set of windows. | 46 // RootWindow is responsible for hosting a set of windows. |
| 47 class AURA_EXPORT RootWindow : public ui::CompositorDelegate, | 47 class AURA_EXPORT RootWindow : public ui::CompositorDelegate, |
| 48 public ui::CompositorObserver, | 48 public ui::CompositorObserver, |
| 49 public Window, | 49 public Window, |
| 50 public internal::FocusManager, | 50 public internal::FocusManager, |
| 51 public ui::LayerAnimationObserver { | 51 public ui::LayerAnimationObserver { |
| 52 public: | 52 public: |
| 53 static RootWindow* GetInstance(); | 53 RootWindow(); |
| 54 static void DeleteInstance(); | 54 virtual ~RootWindow(); |
| 55 | 55 |
| 56 static void set_use_fullscreen_host_window(bool use_fullscreen) { | 56 static void set_use_fullscreen_host_window(bool use_fullscreen) { |
| 57 use_fullscreen_host_window_ = use_fullscreen; | 57 use_fullscreen_host_window_ = use_fullscreen; |
| 58 } | 58 } |
| 59 static bool use_fullscreen_host_window() { | 59 static bool use_fullscreen_host_window() { |
| 60 return use_fullscreen_host_window_; | 60 return use_fullscreen_host_window_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 static void set_hide_host_cursor(bool hide) { | 63 static void set_hide_host_cursor(bool hide) { |
| 64 hide_host_cursor_ = hide; | 64 hide_host_cursor_ = hide; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // Overridden from ui::CompositorDelegate: | 194 // Overridden from ui::CompositorDelegate: |
| 195 virtual void ScheduleDraw() OVERRIDE; | 195 virtual void ScheduleDraw() OVERRIDE; |
| 196 | 196 |
| 197 // Overridden from ui::CompositorObserver: | 197 // Overridden from ui::CompositorObserver: |
| 198 virtual void OnCompositingEnded(ui::Compositor*) OVERRIDE; | 198 virtual void OnCompositingEnded(ui::Compositor*) OVERRIDE; |
| 199 | 199 |
| 200 private: | 200 private: |
| 201 friend class Window; | 201 friend class Window; |
| 202 | 202 |
| 203 RootWindow(); | |
| 204 virtual ~RootWindow(); | |
| 205 | |
| 206 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 203 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
| 207 // sending exited and entered events as its value changes. | 204 // sending exited and entered events as its value changes. |
| 208 void HandleMouseMoved(const MouseEvent& event, Window* target); | 205 void HandleMouseMoved(const MouseEvent& event, Window* target); |
| 209 | 206 |
| 210 // Called whenever the |capture_window_| changes. | 207 // Called whenever the |capture_window_| changes. |
| 211 // Sends capture changed events to event filters for old capture window. | 208 // Sends capture changed events to event filters for old capture window. |
| 212 void HandleMouseCaptureChanged(Window* old_capture_window); | 209 void HandleMouseCaptureChanged(Window* old_capture_window); |
| 213 | 210 |
| 214 bool ProcessMouseEvent(Window* target, MouseEvent* event); | 211 bool ProcessMouseEvent(Window* target, MouseEvent* event); |
| 215 bool ProcessKeyEvent(Window* target, KeyEvent* event); | 212 bool ProcessKeyEvent(Window* target, KeyEvent* event); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 bool synthesize_mouse_move_; | 310 bool synthesize_mouse_move_; |
| 314 bool waiting_on_compositing_end_; | 311 bool waiting_on_compositing_end_; |
| 315 bool draw_on_compositing_end_; | 312 bool draw_on_compositing_end_; |
| 316 | 313 |
| 317 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 314 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 318 }; | 315 }; |
| 319 | 316 |
| 320 } // namespace aura | 317 } // namespace aura |
| 321 | 318 |
| 322 #endif // UI_AURA_ROOT_WINDOW_H_ | 319 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |