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 18 matching lines...) Expand all Loading... |
29 #include "base/time/time.h" | 29 #include "base/time/time.h" |
30 #include "blink/public/resources/grit/blink_resources.h" | 30 #include "blink/public/resources/grit/blink_resources.h" |
31 #include "content/app/resources/grit/content_resources.h" | 31 #include "content/app/resources/grit/content_resources.h" |
32 #include "content/app/strings/grit/content_strings.h" | 32 #include "content/app/strings/grit/content_strings.h" |
33 #include "content/child/bluetooth/web_bluetooth_impl.h" | 33 #include "content/child/bluetooth/web_bluetooth_impl.h" |
34 #include "content/child/child_thread.h" | 34 #include "content/child/child_thread.h" |
35 #include "content/child/content_child_helpers.h" | 35 #include "content/child/content_child_helpers.h" |
36 #include "content/child/geofencing/web_geofencing_provider_impl.h" | 36 #include "content/child/geofencing/web_geofencing_provider_impl.h" |
37 #include "content/child/notifications/notification_dispatcher.h" | 37 #include "content/child/notifications/notification_dispatcher.h" |
38 #include "content/child/notifications/notification_manager.h" | 38 #include "content/child/notifications/notification_manager.h" |
| 39 #include "content/child/service_worker/navigator_connect_provider.h" |
39 #include "content/child/push_messaging/push_dispatcher.h" | 40 #include "content/child/push_messaging/push_dispatcher.h" |
40 #include "content/child/push_messaging/push_provider.h" | 41 #include "content/child/push_messaging/push_provider.h" |
41 #include "content/child/thread_safe_sender.h" | 42 #include "content/child/thread_safe_sender.h" |
42 #include "content/child/web_discardable_memory_impl.h" | 43 #include "content/child/web_discardable_memory_impl.h" |
43 #include "content/child/web_gesture_curve_impl.h" | 44 #include "content/child/web_gesture_curve_impl.h" |
44 #include "content/child/web_url_loader_impl.h" | 45 #include "content/child/web_url_loader_impl.h" |
45 #include "content/child/websocket_bridge.h" | 46 #include "content/child/websocket_bridge.h" |
46 #include "content/child/webthread_impl.h" | 47 #include "content/child/webthread_impl.h" |
47 #include "content/child/worker_task_runner.h" | 48 #include "content/child/worker_task_runner.h" |
48 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 } | 1071 } |
1071 | 1072 |
1072 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { | 1073 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { |
1073 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) | 1074 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) |
1074 return nullptr; | 1075 return nullptr; |
1075 | 1076 |
1076 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), | 1077 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), |
1077 push_dispatcher_.get()); | 1078 push_dispatcher_.get()); |
1078 } | 1079 } |
1079 | 1080 |
| 1081 void BlinkPlatformImpl::connectToUrl( |
| 1082 const WebURL& targetUrl, |
| 1083 blink::WebMessagePortChannel* port, |
| 1084 blink::WebCallbacks<void, blink::WebString>* callbacks) { |
| 1085 NavigatorConnectProvider::ThreadSpecificInstance(thread_safe_sender_.get()) |
| 1086 ->ConnectToUrl(targetUrl, port, callbacks); |
| 1087 } |
| 1088 |
1080 WebThemeEngine* BlinkPlatformImpl::themeEngine() { | 1089 WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
1081 return &native_theme_engine_; | 1090 return &native_theme_engine_; |
1082 } | 1091 } |
1083 | 1092 |
1084 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { | 1093 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { |
1085 return &fallback_theme_engine_; | 1094 return &fallback_theme_engine_; |
1086 } | 1095 } |
1087 | 1096 |
1088 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( | 1097 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( |
1089 const blink::WebString& vfs_file_name, int desired_flags) { | 1098 const blink::WebString& vfs_file_name, int desired_flags) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 } | 1243 } |
1235 | 1244 |
1236 // static | 1245 // static |
1237 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1246 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
1238 WebThreadImplForMessageLoop* impl = | 1247 WebThreadImplForMessageLoop* impl = |
1239 static_cast<WebThreadImplForMessageLoop*>(thread); | 1248 static_cast<WebThreadImplForMessageLoop*>(thread); |
1240 delete impl; | 1249 delete impl; |
1241 } | 1250 } |
1242 | 1251 |
1243 } // namespace content | 1252 } // namespace content |
OLD | NEW |