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

Unified Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 293043003: <webview>: Move PreHandleGestureEvent in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 6 years, 7 months 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/public/browser/browser_plugin_guest_delegate.h
diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h
index cf552cfb5b986b79860394600774ee91a7ffffab..7ae4eb8d997f3f863383765ff663e8d44ee95ff3 100644
--- a/content/public/browser/browser_plugin_guest_delegate.h
+++ b/content/public/browser/browser_plugin_guest_delegate.h
@@ -17,6 +17,10 @@
#include "ui/gfx/size.h"
#include "url/gurl.h"
+namespace blink {
+class WebGestureEvent;
+} // namespace blink
+
namespace content {
class ColorChooser;
@@ -205,6 +209,16 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
typedef base::Callback<void(WebContents*)> DestructionCallback;
virtual void RegisterDestructionCallback(
const DestructionCallback& callback) {}
+
+ // Allows delegates to handle gesture events before sending to the renderer.
+ // Returns true if the |event| was handled and thus shouldn't be processed
+ // by the renderer's event handler. Note that the touch events that create
+ // the gesture are always passed to the renderer since the gesture is created
+ // and dispatched after the touches return without being "preventDefault()"ed.
+ // TODO(fsamuel): Delete this once BrowserPluginGuest is no longer a
+ // WebContentsDelegate.
+ virtual bool PreHandleGestureEvent(WebContents* source,
+ const blink::WebGestureEvent& event);
};
} // namespace content
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/public/browser/browser_plugin_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698