| 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 "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(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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 virtual void scheduleAnimation() OVERRIDE | 86 virtual void scheduleAnimation() OVERRIDE |
| 87 { | 87 { |
| 88 m_client->scheduleAnimation(); | 88 m_client->scheduleAnimation(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 virtual bool haveTouchEventHandlersAt(WebPoint point) | 91 virtual bool haveTouchEventHandlersAt(WebPoint point) |
| 92 { | 92 { |
| 93 return m_client->haveTouchEventHandlersAt(point); | 93 return m_client->haveTouchEventHandlersAt(point); |
| 94 } | 94 } |
| 95 | 95 |
| 96 virtual void didReceiveLastInputEventForVSync() OVERRIDE |
| 97 { |
| 98 m_client->didReceiveLastInputEventForVSync(); |
| 99 } |
| 100 |
| 96 private: | 101 private: |
| 97 cc::InputHandlerClient* m_client; | 102 cc::InputHandlerClient* m_client; |
| 98 }; | 103 }; |
| 99 | 104 |
| 100 | 105 |
| 101 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client) | 106 void WebToCCInputHandlerAdapter::bindToClient(cc::InputHandlerClient* client) |
| 102 { | 107 { |
| 103 m_clientAdapter.reset(new ClientAdapter(client)); | 108 m_clientAdapter.reset(new ClientAdapter(client)); |
| 104 m_handler->bindToClient(m_clientAdapter.get()); | 109 m_handler->bindToClient(m_clientAdapter.get()); |
| 105 } | 110 } |
| 106 | 111 |
| 107 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) | 112 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) |
| 108 { | 113 { |
| 109 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); | 114 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); |
| 110 m_handler->animate(monotonicTimeSeconds); | 115 m_handler->animate(monotonicTimeSeconds); |
| 111 } | 116 } |
| 112 | 117 |
| 113 void WebToCCInputHandlerAdapter::mainThreadHasStoppedFlinging() | 118 void WebToCCInputHandlerAdapter::mainThreadHasStoppedFlinging() |
| 114 { | 119 { |
| 115 m_handler->mainThreadHasStoppedFlinging(); | 120 m_handler->mainThreadHasStoppedFlinging(); |
| 116 } | 121 } |
| 117 | 122 |
| 118 } // namespace WebKit | 123 } // namespace WebKit |
| OLD | NEW |