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

Unified Diff: ui/base/ime/remote_input_method_win.h

Issue 85063002: Add OnCompositionChanged and OnTextCommitted to RemoteInputMethodPrivateWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/remote_input_method_win.h
diff --git a/ui/base/ime/remote_input_method_win.h b/ui/base/ime/remote_input_method_win.h
index 9eec681c5347cdcb6845d57ef668dee6e642316d..f8d9fc017628d61c1a10b97107d3ca13618cdea4 100644
--- a/ui/base/ime/remote_input_method_win.h
+++ b/ui/base/ime/remote_input_method_win.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "base/strings/string16.h"
#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
@@ -22,11 +23,12 @@ class RemoteInputMethodDelegateWin;
} // namespace internal
class InputMethod;
+struct CompositionText;
// RemoteInputMethodWin is a special implementation of ui::InputMethod that
// works as a proxy of an IME handler running in the metro_driver process.
// RemoteInputMethodWin works as follows.
-// - Any action to RemoteInputMethodPrivateWin should be delegated to the
+// - Any action to RemoteInputMethodWin should be delegated to the
// metro_driver process via RemoteInputMethodDelegateWin.
// - Data retrieval from RemoteInputMethodPrivateWin is implemented with
// data cache. Whenever the IME state in the metro_driver process is changed,
@@ -34,6 +36,9 @@ class InputMethod;
// will call RemoteInputMethodPrivateWin::OnCandidatePopupChanged and/or
// RemoteInputMethodPrivateWin::OnInputSourceChanged accordingly so that
// the state cache should be updated.
+// - Some IPC messages that represent actions to TextInputClient should be
+// delegated to RemoteInputMethodPrivateWin so that RemoteInputMethodWin can
+// work as a real proxy.
// Returns true if |widget| requires RemoteInputMethodWin.
bool IsRemoteInputMethodWinRequired(gfx::AcceleratedWidget widget);
@@ -72,6 +77,21 @@ class UI_EXPORT RemoteInputMethodPrivateWin {
// values based on remote IME activities in the metro_driver process.
virtual void OnInputSourceChanged(LANGID langid, bool is_ime) = 0;
+ // Handles composition-update events occurred in the metro_driver process.
+ // Caveats: This method is designed to be used only with
+ // metro_driver::TextService. In other words, there is no garantee that this
+ // method works a wrapper to call ui::TextInputClient::SetCompositionText.
+ virtual void OnCompositionChanged(
+ const CompositionText& composition_text) = 0;
+
+ // Handles text-commit events occurred in the metro_driver process.
+ // Caveats: This method is designed to be used only with
+ // metro_driver::TextService. In other words, there is no garantee that this
+ // method works a wrapper to call ui::TextInputClient::InsertText. In fact,
+ // this method may call ui::TextInputClient::InsertChar when the text input
+ // type of the focused text input client is TEXT_INPUT_TYPE_NONE.
+ virtual void OnTextCommitted(const base::string16& text) = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(RemoteInputMethodPrivateWin);
};
« no previous file with comments | « no previous file | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698