Chromium Code Reviews| Index: Source/WebKit/chromium/src/WebPluginContainerImpl.cpp |
| diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp |
| index 20300619eb86efd4f7824c73022ce5246f3a3880..90d955edc5e97abb064ff2827e2476dc49306842 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); |
| @@ -750,6 +756,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()); |
|
abarth-chromium
2013/05/28 16:34:31
Do we know that frame() and page() return non-zero
Fady Samuel
2013/05/29 04:40:06
I believe so, plugins are created only if they're
|
| + if (m_webPlugin->supportsEditCommands() && view->client()) |
| + view->client()->handleCurrentKeyboardEvent(); |
| + |
| WebCursorInfo cursorInfo; |
| if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) |
| event->setDefaultHandled(); |