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

Unified Diff: content/renderer/browser_plugin/browser_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: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index f3a87a250ed696b3dea192ecb00ae4f2c5b436e5..7dc27566c5ac6d6a8196f6659729ad7e411bd214 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -483,25 +483,26 @@ bool BrowserPlugin::acceptsInputEvents() {
return true;
}
-bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event,
- blink::WebCursorInfo& cursor_info) {
+blink::WebInputEventResult BrowserPlugin::handleInputEvent(
+ const blink::WebInputEvent& event,
+ blink::WebCursorInfo& cursor_info) {
if (guest_crashed_ || !attached())
- return false;
+ return blink::WebInputEventResult::NotHandled;
if (event.type == blink::WebInputEvent::MouseWheel) {
auto wheel_event = static_cast<const blink::WebMouseWheelEvent&>(event);
if (wheel_event.resendingPluginId == browser_plugin_instance_id_)
- return false;
+ return blink::WebInputEventResult::NotHandled;
}
if (blink::WebInputEvent::isGestureEventType(event.type)) {
auto gesture_event = static_cast<const blink::WebGestureEvent&>(event);
if (gesture_event.resendingPluginId == browser_plugin_instance_id_)
- return false;
+ return blink::WebInputEventResult::NotHandled;
}
if (event.type == blink::WebInputEvent::ContextMenu)
- return true;
+ return blink::WebInputEventResult::HandledSuppressed;
if (blink::WebInputEvent::isKeyboardEventType(event.type) &&
!edit_commands_.empty()) {
@@ -521,9 +522,9 @@ bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event,
// Although we forward this event to the guest, we don't report it as consumed
// since other targets of this event in Blink never get that chance either.
if (event.type == blink::WebInputEvent::GestureFlingStart)
- return false;
+ return blink::WebInputEventResult::NotHandled;
- return true;
+ return blink::WebInputEventResult::HandledApplication;
}
bool BrowserPlugin::handleDragStatusUpdate(blink::WebDragStatus drag_status,

Powered by Google App Engine
This is Rietveld 408576698