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

Side by Side Diff: webkit/compositor_bindings/web_to_ccinput_handler_adapter.cc

Issue 12582009: Implement windows mousewheel scroll by page functionality (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix scroll distance calculation to more closely match windows behavior Created 7 years, 9 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h" 5 #include "webkit/compositor_bindings/web_to_ccinput_handler_adapter.h"
6 6
7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h" 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h"
8 8
9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ 9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \
10 COMPILE_ASSERT(static_cast<int>(WebKit::webkit_name) == \ 10 COMPILE_ASSERT(static_cast<int>(WebKit::webkit_name) == \
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) { 45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) {
46 return static_cast<WebInputHandlerClient::ScrollStatus>( 46 return static_cast<WebInputHandlerClient::ScrollStatus>(
47 client_->ScrollBegin( 47 client_->ScrollBegin(
48 point, static_cast<cc::InputHandlerClient::ScrollInputType>(type))); 48 point, static_cast<cc::InputHandlerClient::ScrollInputType>(type)));
49 } 49 }
50 50
51 virtual bool scrollByIfPossible(WebPoint point, WebFloatSize delta) { 51 virtual bool scrollByIfPossible(WebPoint point, WebFloatSize delta) {
52 return client_->ScrollBy(point, delta); 52 return client_->ScrollBy(point, delta);
53 } 53 }
54 54
55 virtual bool scrollVerticallyByPageIfPossible(
56 WebPoint point, WebScrollbar::ScrollDirection direction) {
57 return client_->ScrollVerticallyByPage(point, direction);
58 }
59
55 virtual void scrollEnd() { client_->ScrollEnd(); } 60 virtual void scrollEnd() { client_->ScrollEnd(); }
56 61
57 virtual void pinchGestureBegin() { client_->PinchGestureBegin(); } 62 virtual void pinchGestureBegin() { client_->PinchGestureBegin(); }
58 63
59 virtual void pinchGestureUpdate(float magnify_delta, WebPoint anchor) { 64 virtual void pinchGestureUpdate(float magnify_delta, WebPoint anchor) {
60 client_->PinchGestureUpdate(magnify_delta, anchor); 65 client_->PinchGestureUpdate(magnify_delta, anchor);
61 } 66 }
62 67
63 virtual void pinchGestureEnd() { client_->PinchGestureEnd(); } 68 virtual void pinchGestureEnd() { client_->PinchGestureEnd(); }
64 69
(...skipping 28 matching lines...) Expand all
93 void WebToCCInputHandlerAdapter::Animate(base::TimeTicks time) { 98 void WebToCCInputHandlerAdapter::Animate(base::TimeTicks time) {
94 double monotonic_time_seconds = (time - base::TimeTicks()).InSecondsF(); 99 double monotonic_time_seconds = (time - base::TimeTicks()).InSecondsF();
95 handler_->animate(monotonic_time_seconds); 100 handler_->animate(monotonic_time_seconds);
96 } 101 }
97 102
98 void WebToCCInputHandlerAdapter::MainThreadHasStoppedFlinging() { 103 void WebToCCInputHandlerAdapter::MainThreadHasStoppedFlinging() {
99 handler_->mainThreadHasStoppedFlinging(); 104 handler_->mainThreadHasStoppedFlinging();
100 } 105 }
101 106
102 } // namespace WebKit 107 } // namespace WebKit
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698