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_HOST_H_ | 5 #ifndef UI_AURA_DESKTOP_HOST_H_ |
6 #define UI_AURA_DESKTOP_HOST_H_ | 6 #define UI_AURA_DESKTOP_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "ui/aura/cursor.h" | 10 #include "ui/aura/cursor.h" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
| 13 namespace ui { |
| 14 class InputMethod; |
| 15 } |
| 16 |
13 namespace gfx { | 17 namespace gfx { |
14 class Point; | 18 class Point; |
15 class Rect; | 19 class Rect; |
16 class Size; | 20 class Size; |
17 } | 21 } |
18 | 22 |
19 namespace aura { | 23 namespace aura { |
20 | 24 |
21 class Desktop; | 25 class Desktop; |
22 | 26 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 61 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
58 | 62 |
59 // Queries the mouse's current position relative to the host window. | 63 // Queries the mouse's current position relative to the host window. |
60 // The position is constrained within the host window. | 64 // The position is constrained within the host window. |
61 // You should probably call Desktop::last_mouse_location() instead; this | 65 // You should probably call Desktop::last_mouse_location() instead; this |
62 // method can be expensive. | 66 // method can be expensive. |
63 virtual gfx::Point QueryMouseLocation() = 0; | 67 virtual gfx::Point QueryMouseLocation() = 0; |
64 | 68 |
65 // Posts |native_event| to the platform's event queue. | 69 // Posts |native_event| to the platform's event queue. |
66 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; | 70 virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0; |
| 71 |
| 72 // Gets the input method for the desktop. |
| 73 virtual ui::InputMethod* GetInputMethod() = 0; |
67 }; | 74 }; |
68 | 75 |
69 } // namespace aura | 76 } // namespace aura |
70 | 77 |
71 #endif // UI_AURA_DESKTOP_HOST_H_ | 78 #endif // UI_AURA_DESKTOP_HOST_H_ |
OLD | NEW |