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

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: Rebase Created 5 years 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..91ffa93820164a4271c0d898b1d39ca237f0e536 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::HandledSuppressed;
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::HandledApplication
+ : WebInputEventResult::NotHandled;
}
void WebPluginImpl::didReceiveResponse(const WebURLResponse& response) {

Powered by Google App Engine
This is Rietveld 408576698