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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2029423003: OOPIF IME: Renderer Side Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented WebViewImpl::getCompositionCharacterBounds Created 4 years, 7 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 | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_widget.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index ae5dae610bcbd9de9ba20f004a593cc36d2a9c78..7da840b99e8d02af3009dc5fde8a6b0b4f92e248 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -44,6 +44,7 @@
#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
#include "third_party/WebKit/public/web/WebAXObject.h"
+#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebFrameClient.h"
#include "third_party/WebKit/public/web/WebFrameLoadType.h"
@@ -84,7 +85,6 @@ class WebPresentationClient;
class WebPushClient;
class WebSecurityOrigin;
enum class WebCachePolicy;
-struct WebCompositionUnderline;
struct WebContextMenuData;
struct WebCursorInfo;
struct WebFindOptions;
@@ -261,6 +261,24 @@ class CONTENT_EXPORT RenderFrameImpl
void WasHidden();
void WasShown();
void WidgetWillClose();
+ // The following methods are called by the RenderWidget which receives a
+ // corresponding IME-related IPC. If the target of IME is a pepper plugin,
+ // RenderFrame will pass on the message to the RenderFrame of the plugin.
+ // Otherwise, the selected text for focused frame is adjusted according to
+ // the replacement range (this is needed in Mac for accented characters).
+ // Finally, RenderFrameImpl will pass the parameters back to RenderWidget to
+ // process the IME-related call.
+ void OnImeSetComposition(
+ RenderWidget* render_widget,
+ const base::string16& text,
+ const std::vector<blink::WebCompositionUnderline>& underlines,
+ const gfx::Range& replacement_range,
+ int selection_start,
+ int selection_end);
+ void OnImeConfirmComposition(RenderWidget* render_widget,
+ const base::string16& text,
+ const gfx::Range& replacement_range,
+ bool keep_selection);
// Start/Stop loading notifications.
// TODO(nasko): Those are page-level methods at this time and come from
@@ -730,6 +748,12 @@ class CONTENT_EXPORT RenderFrameImpl
void SendDidCommitProvisionalLoad(blink::WebFrame* frame,
blink::WebHistoryCommitType commit_type,
const blink::WebHistoryItem& item);
+ // Selects the text in |replacement_range| so that it will be replaced by text
+ // added by the call to RenderWidget::HandleImeSetComposition or
+ // RenderWidget::HandleImeConfirmComposition. This is currently used for
+ // accented characters in Mac.
+ void AdjustReplacementRangeForAccentedCharacters(
+ const gfx::Range& replacement_range) const;
// IPC message handlers ------------------------------------------------------
//
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_widget.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698