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" | |
6 | |
7 #include "web_to_ccinput_handler_adapter.h" | 5 #include "web_to_ccinput_handler_adapter.h" |
8 | 6 |
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie
nt.h" | 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandlerClie
nt.h" |
10 | 8 |
11 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ | 9 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, cc_name) \ |
12 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) |
13 | 11 |
14 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainThread, In
putHandlerClient::ScrollOnMainThread); | 12 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusOnMainThread, In
putHandlerClient::ScrollOnMainThread); |
15 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted, InputHa
ndlerClient::ScrollStarted); | 13 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusStarted, InputHa
ndlerClient::ScrollStarted); |
16 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusIgnored, InputHa
ndlerClient::ScrollIgnored); | 14 COMPILE_ASSERT_MATCHING_ENUM(WebInputHandlerClient::ScrollStatusIgnored, InputHa
ndlerClient::ScrollIgnored); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 m_handler->bindToClient(m_clientAdapter.get()); | 99 m_handler->bindToClient(m_clientAdapter.get()); |
102 } | 100 } |
103 | 101 |
104 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) | 102 void WebToCCInputHandlerAdapter::animate(base::TimeTicks time) |
105 { | 103 { |
106 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); | 104 double monotonicTimeSeconds = (time - base::TimeTicks()).InSecondsF(); |
107 m_handler->animate(monotonicTimeSeconds); | 105 m_handler->animate(monotonicTimeSeconds); |
108 } | 106 } |
109 | 107 |
110 } // namespace WebKit | 108 } // namespace WebKit |
OLD | NEW |