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

Unified Diff: Source/WebKit/chromium/src/WebPluginContainerImpl.cpp

Issue 15071004: Plumb edit commands to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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 | « Source/WebKit/chromium/src/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index f4f93780777e94a5be580ebd32604d26c5ed6495..d71af92281b863f72405e9d13ad6cd5338dc9098 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -39,6 +39,7 @@
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
#include "WebPlugin.h"
+#include "WebViewClient.h"
#include "WebViewImpl.h"
#include "core/page/Chrome.h"
#include "core/page/EventHandler.h"
@@ -348,6 +349,11 @@ bool WebPluginContainerImpl::executeEditCommand(const WebString& name)
return true;
}
+bool WebPluginContainerImpl::executeEditCommand(const WebString& name, const WebString& value)
+{
+ return m_webPlugin->executeEditCommand(name, value);
+}
+
WebElement WebPluginContainerImpl::element()
{
return WebElement(m_element);
@@ -753,6 +759,11 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event)
(WebInputEvent::CapsLockOn | WebInputEvent::NumLockOn);
}
+ // Give the client a chance to issue edit comamnds.
+ WebViewImpl* view = WebViewImpl::fromPage(m_element->document()->frame()->page());
+ if (m_webPlugin->supportsEditCommands() && view->client())
+ view->client()->handleCurrentKeyboardEvent();
+
WebCursorInfo cursorInfo;
if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
event->setDefaultHandled();
« no previous file with comments | « Source/WebKit/chromium/src/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698