| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |