OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "content/child/geofencing/web_geofencing_provider_impl.h" | 34 #include "content/child/geofencing/web_geofencing_provider_impl.h" |
35 #include "content/child/navigator_connect/navigator_connect_provider.h" | 35 #include "content/child/navigator_connect/navigator_connect_provider.h" |
36 #include "content/child/notifications/notification_dispatcher.h" | 36 #include "content/child/notifications/notification_dispatcher.h" |
37 #include "content/child/notifications/notification_manager.h" | 37 #include "content/child/notifications/notification_manager.h" |
38 #include "content/child/permissions/permission_dispatcher.h" | 38 #include "content/child/permissions/permission_dispatcher.h" |
39 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" | 39 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" |
40 #include "content/child/push_messaging/push_dispatcher.h" | 40 #include "content/child/push_messaging/push_dispatcher.h" |
41 #include "content/child/push_messaging/push_provider.h" | 41 #include "content/child/push_messaging/push_provider.h" |
42 #include "content/child/thread_safe_sender.h" | 42 #include "content/child/thread_safe_sender.h" |
43 #include "content/child/web_discardable_memory_impl.h" | 43 #include "content/child/web_discardable_memory_impl.h" |
44 #include "content/child/web_gesture_curve_impl.h" | |
45 #include "content/child/web_url_loader_impl.h" | 44 #include "content/child/web_url_loader_impl.h" |
46 #include "content/child/websocket_bridge.h" | 45 #include "content/child/websocket_bridge.h" |
47 #include "content/child/webthread_impl.h" | 46 #include "content/child/webthread_impl.h" |
48 #include "content/child/worker_task_runner.h" | 47 #include "content/child/worker_task_runner.h" |
49 #include "content/public/common/content_client.h" | 48 #include "content/public/common/content_client.h" |
50 #include "net/base/data_url.h" | 49 #include "net/base/data_url.h" |
51 #include "net/base/mime_util.h" | 50 #include "net/base/mime_util.h" |
52 #include "net/base/net_errors.h" | 51 #include "net/base/net_errors.h" |
53 #include "net/base/net_util.h" | 52 #include "net/base/net_util.h" |
54 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" | 53 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" |
55 #include "third_party/WebKit/public/platform/WebData.h" | 54 #include "third_party/WebKit/public/platform/WebData.h" |
56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 55 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
57 #include "third_party/WebKit/public/platform/WebString.h" | 56 #include "third_party/WebKit/public/platform/WebString.h" |
58 #include "third_party/WebKit/public/platform/WebURL.h" | 57 #include "third_party/WebKit/public/platform/WebURL.h" |
59 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" | 58 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" |
60 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 59 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
61 #include "ui/base/layout.h" | 60 #include "ui/base/layout.h" |
| 61 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" |
62 #include "ui/events/keycodes/dom4/keycode_converter.h" | 62 #include "ui/events/keycodes/dom4/keycode_converter.h" |
63 | 63 |
64 using blink::WebData; | 64 using blink::WebData; |
65 using blink::WebFallbackThemeEngine; | 65 using blink::WebFallbackThemeEngine; |
66 using blink::WebLocalizedString; | 66 using blink::WebLocalizedString; |
67 using blink::WebString; | 67 using blink::WebString; |
68 using blink::WebThemeEngine; | 68 using blink::WebThemeEngine; |
69 using blink::WebURL; | 69 using blink::WebURL; |
70 using blink::WebURLError; | 70 using blink::WebURLError; |
71 using blink::WebURLLoader; | 71 using blink::WebURLLoader; |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 | 1020 |
1021 void BlinkPlatformImpl::callOnMainThread( | 1021 void BlinkPlatformImpl::callOnMainThread( |
1022 void (*func)(void*), void* context) { | 1022 void (*func)(void*), void* context) { |
1023 main_thread_task_runner_->PostTask(FROM_HERE, base::Bind(func, context)); | 1023 main_thread_task_runner_->PostTask(FROM_HERE, base::Bind(func, context)); |
1024 } | 1024 } |
1025 | 1025 |
1026 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( | 1026 blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve( |
1027 blink::WebGestureDevice device_source, | 1027 blink::WebGestureDevice device_source, |
1028 const blink::WebFloatPoint& velocity, | 1028 const blink::WebFloatPoint& velocity, |
1029 const blink::WebSize& cumulative_scroll) { | 1029 const blink::WebSize& cumulative_scroll) { |
1030 return WebGestureCurveImpl::CreateFromDefaultPlatformCurve( | 1030 return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve( |
1031 gfx::Vector2dF(velocity.x, velocity.y), | 1031 gfx::Vector2dF(velocity.x, velocity.y), |
1032 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), | 1032 gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height), |
1033 IsMainThread()).release(); | 1033 IsMainThread()).release(); |
1034 } | 1034 } |
1035 | 1035 |
1036 void BlinkPlatformImpl::didStartWorkerRunLoop() { | 1036 void BlinkPlatformImpl::didStartWorkerRunLoop() { |
1037 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 1037 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
1038 worker_task_runner->OnWorkerRunLoopStarted(); | 1038 worker_task_runner->OnWorkerRunLoopStarted(); |
1039 } | 1039 } |
1040 | 1040 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
1256 static_cast<ui::DomCode>(dom_code))); | 1256 static_cast<ui::DomCode>(dom_code))); |
1257 } | 1257 } |
1258 | 1258 |
1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
1261 code.utf8().data())); | 1261 code.utf8().data())); |
1262 } | 1262 } |
1263 | 1263 |
1264 } // namespace content | 1264 } // namespace content |
OLD | NEW |