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

Unified Diff: content/browser/renderer_host/overscroll_controller.h

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Address comments. Created 3 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/browser/renderer_host/overscroll_controller.h
diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h
index 4e6134d91f0415908a581a74d95535718a64385e..ebb9fc828d7277f38b606fa3fc141bb2207567a8 100644
--- a/content/browser/renderer_host/overscroll_controller.h
+++ b/content/browser/renderer_host/overscroll_controller.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebGestureEvent.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
@@ -38,8 +39,11 @@ enum class OverscrollSource {
// status accordingly.
class OverscrollController {
public:
- OverscrollController();
- virtual ~OverscrollController();
+ // Exported for testing.
+ // TODO(mcnee): Tests needing CONTENT_EXPORT are BrowserPlugin specific.
+ // Remove after removing BrowserPlugin (crbug.com/533069).
+ CONTENT_EXPORT OverscrollController();
+ CONTENT_EXPORT virtual ~OverscrollController();
// This must be called when dispatching any event from the
// RenderWidgetHostView so that the state of the overscroll gesture can be
@@ -49,7 +53,12 @@ class OverscrollController {
// This must be called when the ACK for any event comes in. This updates the
// overscroll gesture status as appropriate.
- void ReceivedEventACK(const blink::WebInputEvent& event, bool processed);
+ // Virtual and exported for testing.
+ // TODO(mcnee): Tests needing CONTENT_EXPORT and virtual are BrowserPlugin
+ // specific. Remove after removing BrowserPlugin (crbug.com/533069).
+ CONTENT_EXPORT virtual void ReceivedEventACK(
+ const blink::WebInputEvent& event,
+ bool processed);
// This must be called when a gesture event is filtered out and not sent to
// the renderer.
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.cc ('k') | content/browser/renderer_host/overscroll_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698