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

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

Issue 15149006: <webview>: Plumb edit commands (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed fprintf Created 7 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 | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51548349248561ab4a1b1d36cc6aeb3bc34f37fe..ce7f8131885a36ed96a97ff04f2283c4b1b8fac0 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -1242,6 +1242,10 @@ bool BrowserPlugin::supportsKeyboardFocus() const {
return true;
}
+bool BrowserPlugin::supportsEditCommands() const {
+ return true;
+}
+
bool BrowserPlugin::canProcessDrag() const {
return true;
}
@@ -1518,6 +1522,17 @@ bool BrowserPlugin::handleInputEvent(const WebKit::WebInputEvent& event,
touch_event->touchesLength += touch_event->changedTouchesLength;
modified_event = touch_event.get();
}
+
+ if (WebKit::WebInputEvent::isKeyboardEventType(event.type) &&
+ !edit_commands_.empty()) {
+ browser_plugin_manager()->Send(
+ new BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent(
+ render_view_routing_id_,
+ instance_id_,
+ edit_commands_));
+ edit_commands_.clear();
+ }
+
browser_plugin_manager()->Send(
new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_,
guest_instance_id_,
@@ -1578,6 +1593,13 @@ bool BrowserPlugin::executeEditCommand(const WebKit::WebString& name) {
return true;
}
+bool BrowserPlugin::executeEditCommand(const WebKit::WebString& name,
+ const WebKit::WebString& value) {
+ edit_commands_.push_back(EditCommand(name.utf8(), value.utf8()));
+ // BrowserPlugin swallows edit commands.
+ return true;
+}
+
void BrowserPlugin::OnLockMouseACK(bool succeeded) {
browser_plugin_manager()->Send(new BrowserPluginHostMsg_LockMouse_ACK(
render_view_routing_id_,
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698