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

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

Issue 11402002: Add API for hit testing layer_impl touchEventHandlerRegions from the host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Testing more points on the boundaries and also added test for deviceScaleFactor and pageScaleFactor Created 8 years, 1 month 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
« cc/layer_tree_host_impl.cc ('K') | « cc/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 6
7 #include "web_to_ccinput_handler_adapter.h" 7 #include "web_to_ccinput_handler_adapter.h"
8 8
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie nt.h"
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::TimeTicks startTime = base::TimeTicks::FromInternalValue(startTime Sec * base::Time::kMicrosecondsPerSecond); 83 base::TimeTicks startTime = base::TimeTicks::FromInternalValue(startTime Sec * base::Time::kMicrosecondsPerSecond);
84 base::TimeDelta duration = base::TimeDelta::FromMicroseconds(durationSec * base::Time::kMicrosecondsPerSecond); 84 base::TimeDelta duration = base::TimeDelta::FromMicroseconds(durationSec * base::Time::kMicrosecondsPerSecond);
85 m_client->startPageScaleAnimation(targetPosition, anchorPoint, pageScale , startTime, duration); 85 m_client->startPageScaleAnimation(targetPosition, anchorPoint, pageScale , startTime, duration);
86 } 86 }
87 87
88 virtual void scheduleAnimation() OVERRIDE 88 virtual void scheduleAnimation() OVERRIDE
89 { 89 {
90 m_client->scheduleAnimation(); 90 m_client->scheduleAnimation();
91 } 91 }
92 92
93 virtual bool checkTouchEventHandlerRegionHit(WebPoint point)
94 {
95 return m_client->checkTouchEventHandlerRegionHit(point);
96 }
97
93 private: 98 private:
94 cc::InputHandlerClient* m_client; 99 cc::InputHandlerClient* m_client;
95 }; 100 };
96 101
97 102
98 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client) 103 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client)
99 { 104 {
100 m_clientAdapter.reset(new ClientAdapter(client)); 105 m_clientAdapter.reset(new ClientAdapter(client));
101 m_handler->bindToClient(m_clientAdapter.get()); 106 m_handler->bindToClient(m_clientAdapter.get());
102 } 107 }
103 108
104 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) 109 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time)
105 { 110 {
106 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); 111 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF();
107 m_handler->animate(monotonicTimeSeconds); 112 m_handler->animate(monotonicTimeSeconds);
108 } 113 }
109 114
110 } // namespace WebKit 115 } // namespace WebKit
OLDNEW
« cc/layer_tree_host_impl.cc ('K') | « cc/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698