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_DESKTOP_H_ | 5 #ifndef UI_AURA_DESKTOP_H_ |
6 #define UI_AURA_DESKTOP_H_ | 6 #define UI_AURA_DESKTOP_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 DesktopHost; | 36 class DesktopHost; |
36 class DesktopObserver; | 37 class DesktopObserver; |
37 class KeyEvent; | 38 class KeyEvent; |
38 class MouseEvent; | 39 class MouseEvent; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 130 |
130 // Sets capture to the specified window. | 131 // Sets capture to the specified window. |
131 void SetCapture(Window* window); | 132 void SetCapture(Window* window); |
132 | 133 |
133 // If |window| has mouse capture, the current capture window is set to NULL. | 134 // If |window| has mouse capture, the current capture window is set to NULL. |
134 void ReleaseCapture(Window* window); | 135 void ReleaseCapture(Window* window); |
135 | 136 |
136 // Overridden from Window: | 137 // Overridden from Window: |
137 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; | 138 virtual void SetTransform(const ui::Transform& transform) OVERRIDE; |
138 | 139 |
| 140 // Gets the input method for the desktop. |
| 141 ui::InputMethod* GetInputMethod(); |
| 142 |
139 private: | 143 private: |
140 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 144 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
141 // sending exited and entered events as its value changes. | 145 // sending exited and entered events as its value changes. |
142 void HandleMouseMoved(const MouseEvent& event, Window* target); | 146 void HandleMouseMoved(const MouseEvent& event, Window* target); |
143 | 147 |
144 bool ProcessMouseEvent(Window* target, MouseEvent* event); | 148 bool ProcessMouseEvent(Window* target, MouseEvent* event); |
145 bool ProcessKeyEvent(Window* target, KeyEvent* event); | 149 bool ProcessKeyEvent(Window* target, KeyEvent* event); |
146 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); | 150 ui::TouchStatus ProcessTouchEvent(Window* target, TouchEvent* event); |
147 | 151 |
148 // Overridden from ui::CompositorDelegate | 152 // Overridden from ui::CompositorDelegate |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 Window* mouse_moved_handler_; | 221 Window* mouse_moved_handler_; |
218 Window* focused_window_; | 222 Window* focused_window_; |
219 Window* touch_event_handler_; | 223 Window* touch_event_handler_; |
220 | 224 |
221 DISALLOW_COPY_AND_ASSIGN(Desktop); | 225 DISALLOW_COPY_AND_ASSIGN(Desktop); |
222 }; | 226 }; |
223 | 227 |
224 } // namespace aura | 228 } // namespace aura |
225 | 229 |
226 #endif // UI_AURA_DESKTOP_H_ | 230 #endif // UI_AURA_DESKTOP_H_ |
OLD | NEW |