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

Unified Diff: content/renderer/npapi/webplugin_impl.cc

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build failures and disabled click test Created 5 years, 1 month 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/npapi/webplugin_impl.cc
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc
index ac739b5bc974523564a2ec6ba1dec844a03e7e65..cac0384d780f933a1633154c26c844ae32ac199c 100644
--- a/content/renderer/npapi/webplugin_impl.cc
+++ b/content/renderer/npapi/webplugin_impl.cc
@@ -72,6 +72,7 @@ using blink::WebFrame;
using blink::WebHTTPBody;
using blink::WebHTTPHeaderVisitor;
using blink::WebInputEvent;
+using blink::WebInputEventResult;
using blink::WebKeyboardEvent;
using blink::WebMouseEvent;
using blink::WebPluginContainer;
@@ -418,11 +419,12 @@ bool WebPluginImpl::acceptsInputEvents() {
return accepts_input_events_;
}
-bool WebPluginImpl::handleInputEvent(
- const WebInputEvent& event, WebCursorInfo& cursor_info) {
+WebInputEventResult WebPluginImpl::handleInputEvent(
+ const WebInputEvent& event,
+ WebCursorInfo& cursor_info) {
// Swallow context menu events in order to suppress the default context menu.
if (event.type == WebInputEvent::ContextMenu)
- return true;
+ return WebInputEventResult::HandledDefaultHandler;
WebCursor::CursorInfo web_cursor_info;
bool ret = delegate_->HandleInputEvent(event, &web_cursor_info);
@@ -433,7 +435,8 @@ bool WebPluginImpl::handleInputEvent(
#if defined(OS_WIN)
cursor_info.externalHandle = web_cursor_info.external_handle;
#endif
- return ret;
+ return ret ? WebInputEventResult::HandledDefaultHandler
Rick Byers 2015/11/23 21:59:55 'true' here can mean two things here (script or de
dtapuska 2015/11/24 15:23:02 see other comment in the fullscreen plugin.
+ : WebInputEventResult::NotHandled;
}
void WebPluginImpl::didReceiveResponse(const WebURLResponse& response) {

Powered by Google App Engine
This is Rietveld 408576698