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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_ 5 #ifndef CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_
6 #define CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_ 6 #define CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "base/time.h" 9 #include "base/time.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 class RenderWidgetHost; 13 class RenderWidgetHost;
13 14
14 // This is a base class representing a single scroll gesture. These gestures are 15 // This is a base class representing a single scroll gesture. These gestures are
15 // paired with the rendering benchmarking system to (automatically) measure how 16 // paired with the rendering benchmarking system to (automatically) measure how
16 // smoothnly chrome is responding to user input. 17 // smoothnly chrome is responding to user input.
17 class SmoothScrollGesture { 18 class SmoothScrollGesture : public base::RefCounted<SmoothScrollGesture> {
18 public: 19 public:
19 virtual ~SmoothScrollGesture() {}
20 20
21 // When called, the gesture should compute its state at the provided timestamp 21 // When called, the gesture should compute its state at the provided timestamp
22 // and send the right input events to the provided RenderWidgetHost to 22 // and send the right input events to the provided RenderWidgetHost to
23 // simulate the gesture having run up to that point in time. 23 // simulate the gesture having run up to that point in time.
24 // 24 //
25 // This function should return true until the gesture is over. A false return 25 // This function should return true until the gesture is over. A false return
26 // value will stop ticking the gesture and clean it up. 26 // value will stop ticking the gesture and clean it up.
27 virtual bool ForwardInputEvents(base::TimeTicks now, 27 virtual bool ForwardInputEvents(base::TimeTicks now,
28 RenderWidgetHost* host) = 0; 28 RenderWidgetHost* host) = 0;
29 protected:
30 friend class base::RefCounted<SmoothScrollGesture>;
31 virtual ~SmoothScrollGesture() {}
29 }; 32 };
30 33
31 } // namespace content 34 } // namespace content
32 35
33 #endif // CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_ 36 #endif // CONTENT_PORT_BROWSER_SMOOTH_SCROLL_GESTURE_H_
OLDNEW
« 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