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

Unified Diff: components/plugins/renderer/webview_plugin.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: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 29b10080298dc001f660f52c1561390ede745e3a..5e185c19f74a27039f78b1967f7e8b6c18e0cf7e 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -200,17 +200,18 @@ void WebViewPlugin::updateFocus(bool focused, blink::WebFocusType focus_type) {
bool WebViewPlugin::acceptsInputEvents() { return true; }
-bool WebViewPlugin::handleInputEvent(const WebInputEvent& event,
- WebCursorInfo& cursor) {
+blink::WebInputEventResult WebViewPlugin::handleInputEvent(
+ const WebInputEvent& event,
+ WebCursorInfo& cursor) {
// For tap events, don't handle them. They will be converted to
// mouse events later and passed to here.
if (event.type == WebInputEvent::GestureTap)
- return false;
+ return blink::WebInputEventResult::NotHandled;
// For LongPress events we return false, since otherwise the context menu will
// be suppressed. https://crbug.com/482842
if (event.type == WebInputEvent::GestureLongPress)
- return false;
+ return blink::WebInputEventResult::NotHandled;
if (event.type == WebInputEvent::ContextMenu) {
if (delegate_) {
@@ -218,10 +219,10 @@ bool WebViewPlugin::handleInputEvent(const WebInputEvent& event,
reinterpret_cast<const WebMouseEvent&>(event);
delegate_->ShowContextMenu(mouse_event);
}
- return true;
+ return blink::WebInputEventResult::HandledSuppressed;
}
current_cursor_ = cursor;
- bool handled = web_view_->handleInputEvent(event);
+ blink::WebInputEventResult handled = web_view_->handleInputEvent(event);
cursor = current_cursor_;
return handled;

Powered by Google App Engine
This is Rietveld 408576698