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

Unified Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 126118: Integrating GtkIMContext into the RenderWidgetHostViewGtk class.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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 | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host.h
===================================================================
--- chrome/browser/renderer_host/render_widget_host.h (revision 18994)
+++ chrome/browser/renderer_host/render_widget_host.h (working copy)
@@ -279,6 +279,45 @@
void CancelUpdateTextDirection();
void NotifyTextDirection();
+ // Notifies the renderer whether or not the IME attached to this process is
+ // activated.
+ // When the IME is activated, a renderer process sends IPC messages to notify
+ // the status of its composition node. (This message is mainly used for
+ // notifying the position of the input cursor so that the browser can
+ // display IME windows under the cursor.)
+ void ImeSetInputMode(bool activate);
+
+ // Update the composition node of the renderer (or WebKit).
+ // WebKit has a special node (a composition node) for IMEs to change its text
+ // without affecting any other DOM nodes. When the IME (attached to the
+ // browser) updates its text, the browser sends IPC messages to update the
+ // composition node of the renderer.
+ // (Read the comments of each function for its detail.)
+
+ // Sets the text of the composition node.
+ // This function can also update the cursor position and mark the specified
+ // range in the composition node.
+ // A browser should call this function:
+ // * when it receives a WM_IME_COMPOSITION message with a GCS_COMPSTR flag
+ // (on Windows);
+ // * when it receives a "preedit_changed" signal of GtkIMContext (on Linux);
+ // * when markedText of NSTextInput is called (on Mac).
+ void ImeSetComposition(const std::wstring& ime_string,
+ int cursor_position,
+ int target_start,
+ int target_end);
+
+ // Finishes an ongoing composition with the specified text.
+ // A browser should call this function:
+ // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag
+ // (on Windows);
+ // * when it receives a "commit" signal of GtkIMContext (on Linux);
+ // * when insertText of NSTextInput is called (on Mac).
+ void ImeConfirmComposition(const std::wstring& ime_string);
+
+ // Cancels an ongoing composition.
+ void ImeCancelComposition();
+
// This is for derived classes to give us access to the resizer rect.
// And to also expose it to the RenderWidgetHostView.
virtual gfx::Rect GetRootWindowResizerRect() const;
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698