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

Unified Diff: content/port/browser/smooth_scroll_gesture.h

Issue 10837330: Add a completion callback to gpuBenchmarking.beginSmoothScroll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual and todo note Created 8 years, 4 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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698