Index: content/port/browser/smooth_scroll_gesture.h |
diff --git a/content/port/browser/smooth_scroll_gesture.h b/content/port/browser/smooth_scroll_gesture.h |
index 6d6672cbd26b87d0664ea4b4f52954b429f774be..4e2c1d908f411e0e6d63b49c6e96798d7f86b665 100644 |
--- a/content/port/browser/smooth_scroll_gesture.h |
+++ b/content/port/browser/smooth_scroll_gesture.h |
@@ -5,6 +5,7 @@ |
#ifndef CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_ |
#define CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_ |
+#include "base/memory/ref_counted.h" |
#include "base/time.h" |
namespace content { |
@@ -14,9 +15,8 @@ class RenderWidgetHost; |
// This is a base class representing a single scroll gesture. These gestures are |
// paired with the rendering benchmarking system to (automatically) measure how |
// smoothnly chrome is responding to user input. |
-class SmoothScrollGesture { |
+class SmoothScrollGesture : public base::RefCounted<SmoothScrollGesture> { |
public: |
- virtual ~SmoothScrollGesture() {} |
// When called, the gesture should compute its state at the provided timestamp |
// and send the right input events to the provided RenderWidgetHost to |
@@ -26,6 +26,9 @@ class SmoothScrollGesture { |
// value will stop ticking the gesture and clean it up. |
virtual bool ForwardInputEvents(base::TimeTicks now, |
RenderWidgetHost* host) = 0; |
+ protected: |
+ friend class base::RefCounted<SmoothScrollGesture>; |
+ virtual ~SmoothScrollGesture() {} |
}; |
} // namespace content |