Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: ui/aura/desktop_host.h

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git mv desktop_host_unittest.cc desktop_host_ime_unittest.cc Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/aura/desktop_host.h
diff --git a/ui/aura/desktop_host.h b/ui/aura/desktop_host.h
index f72fc52bb4dbba1b2314838e7a98ef83462323db..9864f52160488a27c4f162ebf4ee38b198187ce4 100644
--- a/ui/aura/desktop_host.h
+++ b/ui/aura/desktop_host.h
@@ -8,8 +8,13 @@
#include "base/message_loop.h"
#include "ui/aura/cursor.h"
+#include "ui/base/ime/input_method_delegate.h"
#include "ui/gfx/native_widget_types.h"
+namespace ui {
+class InputMethod;
+}
+
namespace gfx {
class Point;
class Rect;
@@ -22,7 +27,8 @@ class Desktop;
// DesktopHost bridges between a native window and the embedded Desktop. It
// provides the accelerated widget and maps events from the native os to aura.
-class DesktopHost : public MessageLoop::Dispatcher {
+class DesktopHost : public MessageLoop::Dispatcher,
+ public ui::internal::InputMethodDelegate {
public:
virtual ~DesktopHost() {}
@@ -64,6 +70,13 @@ class DesktopHost : public MessageLoop::Dispatcher {
// Posts |native_event| to the platform's event queue.
virtual void PostNativeEvent(const base::NativeEvent& native_event) = 0;
+
+ // Sets the input method for the desktop. DesktopHost owns the input method.
+ // The function is only for unit tests.
+ virtual void SetInputMethod(ui::InputMethod* input_method) = 0;
+
+ // Gets the input method for the desktop.
sky 2011/12/01 17:01:09 Document ownership.
Yusuke Sato 2011/12/02 02:18:31 Done.
+ virtual ui::InputMethod* GetInputMethod() const = 0;
};
} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698