OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/task.h" | 13 #include "base/task.h" |
14 #include "ui/aura/aura_export.h" | 14 #include "ui/aura/aura_export.h" |
15 #include "ui/aura/cursor.h" | 15 #include "ui/aura/cursor.h" |
16 #include "ui/aura/focus_manager.h" | 16 #include "ui/aura/focus_manager.h" |
17 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
18 #include "ui/base/events.h" | 18 #include "ui/base/events.h" |
19 #include "ui/gfx/compositor/compositor.h" | 19 #include "ui/gfx/compositor/compositor.h" |
20 #include "ui/gfx/compositor/layer_animation_observer.h" | 20 #include "ui/gfx/compositor/layer_animation_observer.h" |
21 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
22 #include "ui/gfx/point.h" | 22 #include "ui/gfx/point.h" |
23 | 23 |
24 namespace gfx { | 24 namespace gfx { |
25 class Size; | 25 class Size; |
26 } | 26 } |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
29 class InputMethod; | |
29 class LayerAnimationSequence; | 30 class LayerAnimationSequence; |
30 class Transform; | 31 class Transform; |
31 } | 32 } |
32 | 33 |
33 namespace aura { | 34 namespace aura { |
34 | 35 |
35 class RootWindowHost; | 36 class RootWindowHost; |
36 class RootWindowObserver; | 37 class RootWindowObserver; |
37 class KeyEvent; | 38 class KeyEvent; |
38 class MouseEvent; | 39 class MouseEvent; |
(...skipping 18 matching lines...) Expand all Loading... | |
57 gfx::Point last_mouse_location() const { return last_mouse_location_; } | 58 gfx::Point last_mouse_location() const { return last_mouse_location_; } |
58 gfx::NativeCursor last_cursor() const { return last_cursor_; } | 59 gfx::NativeCursor last_cursor() const { return last_cursor_; } |
59 StackingClient* stacking_client() { return stacking_client_.get(); } | 60 StackingClient* stacking_client() { return stacking_client_.get(); } |
60 Window* active_window() { return active_window_; } | 61 Window* active_window() { return active_window_; } |
61 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } | 62 Window* mouse_pressed_handler() { return mouse_pressed_handler_; } |
62 Window* capture_window() { return capture_window_; } | 63 Window* capture_window() { return capture_window_; } |
63 ScreenAura* screen() { return screen_; } | 64 ScreenAura* screen() { return screen_; } |
64 | 65 |
65 void SetStackingClient(StackingClient* stacking_client); | 66 void SetStackingClient(StackingClient* stacking_client); |
66 | 67 |
68 // Sets the input method for the root window. | |
69 void SetInputMethod(ui::InputMethod* input_method); | |
Ben Goodger (Google)
2011/12/12 16:51:03
The Shell can actually set this on the RootWindow
Yusuke Sato
2011/12/14 13:42:04
Done.
| |
70 ui::InputMethod* GetInputMethod() const; | |
71 | |
67 // Shows the root window host. | 72 // Shows the root window host. |
68 void ShowRootWindow(); | 73 void ShowRootWindow(); |
69 | 74 |
70 // Sets the size of the root window. | 75 // Sets the size of the root window. |
71 void SetHostSize(const gfx::Size& size); | 76 void SetHostSize(const gfx::Size& size); |
72 gfx::Size GetHostSize() const; | 77 gfx::Size GetHostSize() const; |
73 | 78 |
74 // Shows the specified cursor. | 79 // Shows the specified cursor. |
75 void SetCursor(gfx::NativeCursor cursor); | 80 void SetCursor(gfx::NativeCursor cursor); |
76 | 81 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 | 192 |
188 // Initializes the root window. | 193 // Initializes the root window. |
189 void Init(); | 194 void Init(); |
190 | 195 |
191 // Parses the switch describing the initial size for the host window and | 196 // Parses the switch describing the initial size for the host window and |
192 // returns bounds for the window. | 197 // returns bounds for the window. |
193 gfx::Rect GetInitialHostWindowBounds() const; | 198 gfx::Rect GetInitialHostWindowBounds() const; |
194 | 199 |
195 scoped_refptr<ui::Compositor> compositor_; | 200 scoped_refptr<ui::Compositor> compositor_; |
196 | 201 |
202 scoped_ptr<ui::InputMethod> input_method_; | |
203 | |
197 scoped_ptr<RootWindowHost> host_; | 204 scoped_ptr<RootWindowHost> host_; |
198 | 205 |
199 scoped_ptr<StackingClient> stacking_client_; | 206 scoped_ptr<StackingClient> stacking_client_; |
200 | 207 |
201 static RootWindow* instance_; | 208 static RootWindow* instance_; |
202 | 209 |
203 // If set before the RootWindow is created, the host window will cover the | 210 // If set before the RootWindow is created, the host window will cover the |
204 // entire screen. Note that this can still be overridden via the | 211 // entire screen. Note that this can still be overridden via the |
205 // switches::kAuraHostWindowSize flag. | 212 // switches::kAuraHostWindowSize flag. |
206 static bool use_fullscreen_host_window_; | 213 static bool use_fullscreen_host_window_; |
(...skipping 28 matching lines...) Expand all Loading... | |
235 Window* mouse_moved_handler_; | 242 Window* mouse_moved_handler_; |
236 Window* focused_window_; | 243 Window* focused_window_; |
237 Window* touch_event_handler_; | 244 Window* touch_event_handler_; |
238 | 245 |
239 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 246 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
240 }; | 247 }; |
241 | 248 |
242 } // namespace aura | 249 } // namespace aura |
243 | 250 |
244 #endif // UI_AURA_ROOT_WINDOW_H_ | 251 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |