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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2568093003: Support parsing BackgroundSpans and UnderlineSpans in Android IME's commitText() (Closed)
Patch Set: Use addCompositionUnderlines() where I said I couldn't Created 3 years, 11 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
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 5551919c3f7331faecb7199eeee453b20ee14578..e9a26b3765e417223d8de5af6fe593bfbbb79cdc 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -547,10 +547,12 @@ bool BrowserPlugin::setComposition(
int selectionEnd) {
if (!attached())
return false;
+
std::vector<blink::WebCompositionUnderline> std_underlines;
for (size_t i = 0; i < underlines.size(); ++i) {
std_underlines.push_back(underlines[i]);
}
+
BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeSetComposition(
browser_plugin_instance_id_,
text.utf8(),
@@ -561,13 +563,21 @@ bool BrowserPlugin::setComposition(
return true;
}
-bool BrowserPlugin::commitText(const blink::WebString& text,
- int relative_cursor_pos) {
+bool BrowserPlugin::commitText(
+ const blink::WebString& text,
+ const blink::WebVector<blink::WebCompositionUnderline>& underlines,
+ int relative_cursor_pos) {
if (!attached())
return false;
+ std::vector<blink::WebCompositionUnderline> std_underlines;
+ for (size_t i = 0; i < underlines.size(); ++i) {
+ std_underlines.push_back(std_underlines[i]);
+ }
+
BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeCommitText(
- browser_plugin_instance_id_, text.utf8(), relative_cursor_pos));
+ browser_plugin_instance_id_, text.utf8(), std_underlines,
+ relative_cursor_pos));
// TODO(kochi): This assumes the IPC handling always succeeds.
return true;
}
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698