| 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 "web_to_ccinput_handler_adapter.h" | 5 #include "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(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enu
ms) | 10 COMPILE_ASSERT(int(WebKit::webkit_name) == int(cc::cc_name), mismatching_enu
ms) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 virtual ~ClientAdapter() | 41 virtual ~ClientAdapter() |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERR
IDE | 45 virtual ScrollStatus scrollBegin(WebPoint point, ScrollInputType type) OVERR
IDE |
| 46 { | 46 { |
| 47 return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scroll
Begin(point, static_cast<cc::InputHandlerClient::ScrollInputType>(type))); | 47 return static_cast<WebInputHandlerClient::ScrollStatus>(m_client->scroll
Begin(point, static_cast<cc::InputHandlerClient::ScrollInputType>(type))); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void scrollBy(WebPoint point, WebSize offset) OVERRIDE | 50 virtual bool scrollBy(WebPoint point, WebSize offset) OVERRIDE |
| 51 { | 51 { |
| 52 m_client->scrollBy(point, offset); | 52 return m_client->scrollBy(point, offset); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void scrollEnd() OVERRIDE | 55 virtual void scrollEnd() OVERRIDE |
| 56 { | 56 { |
| 57 m_client->scrollEnd(); | 57 m_client->scrollEnd(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual void pinchGestureBegin() OVERRIDE | 60 virtual void pinchGestureBegin() OVERRIDE |
| 61 { | 61 { |
| 62 m_client->pinchGestureBegin(); | 62 m_client->pinchGestureBegin(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 m_handler->bindToClient(m_clientAdapter.get()); | 99 m_handler->bindToClient(m_clientAdapter.get()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) | 102 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) |
| 103 { | 103 { |
| 104 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); | 104 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); |
| 105 m_handler->animate(monotonicTimeSeconds); | 105 m_handler->animate(monotonicTimeSeconds); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace WebKit | 108 } // namespace WebKit |
| OLD | NEW |