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

Side by Side Diff: content/browser/renderer_host/overscroll_controller.h

Issue 13931009: Add latency info to input events sent to RenderWidget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
11 11
12 namespace cc {
13 struct LatencyInfo;
14 }
15
12 namespace content { 16 namespace content {
13 17
14 class MockRenderWidgetHost; 18 class MockRenderWidgetHost;
15 class OverscrollControllerDelegate; 19 class OverscrollControllerDelegate;
16 class RenderWidgetHostImpl; 20 class RenderWidgetHostImpl;
17 21
18 enum OverscrollMode { 22 enum OverscrollMode {
19 OVERSCROLL_NONE, 23 OVERSCROLL_NONE,
20 OVERSCROLL_NORTH, 24 OVERSCROLL_NORTH,
21 OVERSCROLL_SOUTH, 25 OVERSCROLL_SOUTH,
(...skipping 10 matching lines...) Expand all
32 public: 36 public:
33 // Creates an overscroll controller for the specified RenderWidgetHost. 37 // Creates an overscroll controller for the specified RenderWidgetHost.
34 // The RenderWidgetHost owns this overscroll controller. 38 // The RenderWidgetHost owns this overscroll controller.
35 explicit OverscrollController(RenderWidgetHostImpl* widget_host); 39 explicit OverscrollController(RenderWidgetHostImpl* widget_host);
36 virtual ~OverscrollController(); 40 virtual ~OverscrollController();
37 41
38 // This must be called when dispatching any event from the 42 // This must be called when dispatching any event from the
39 // RenderWidgetHostView so that the state of the overscroll gesture can be 43 // RenderWidgetHostView so that the state of the overscroll gesture can be
40 // updated properly. 44 // updated properly.
41 // Returns true if the event should be dispatched, false otherwise. 45 // Returns true if the event should be dispatched, false otherwise.
42 bool WillDispatchEvent(const WebKit::WebInputEvent& event); 46 bool WillDispatchEvent(const WebKit::WebInputEvent& event,
47 const cc::LatencyInfo& latency_info);
43 48
44 // This must be called when the ACK for any event comes in. This updates the 49 // This must be called when the ACK for any event comes in. This updates the
45 // overscroll gesture status as appropriate. 50 // overscroll gesture status as appropriate.
46 void ReceivedEventACK(const WebKit::WebInputEvent& event, bool processed); 51 void ReceivedEventACK(const WebKit::WebInputEvent& event, bool processed);
47 52
48 OverscrollMode overscroll_mode() const { return overscroll_mode_; } 53 OverscrollMode overscroll_mode() const { return overscroll_mode_; }
49 54
50 void set_delegate(OverscrollControllerDelegate* delegate) { 55 void set_delegate(OverscrollControllerDelegate* delegate) {
51 delegate_ = delegate; 56 delegate_ = delegate;
52 } 57 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // The delegate that receives the overscroll updates. The delegate is not 104 // The delegate that receives the overscroll updates. The delegate is not
100 // owned by this controller. 105 // owned by this controller.
101 OverscrollControllerDelegate* delegate_; 106 OverscrollControllerDelegate* delegate_;
102 107
103 DISALLOW_COPY_AND_ASSIGN(OverscrollController); 108 DISALLOW_COPY_AND_ASSIGN(OverscrollController);
104 }; 109 };
105 110
106 } // namespace content 111 } // namespace content
107 112
108 #endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_ 113 #endif // CONTENT_BROWSER_RENDERER_HOST_OVERSCROLL_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gesture_event_filter.cc ('k') | content/browser/renderer_host/overscroll_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698