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 16 matching lines...) Expand all Loading... |
27 #include "base/sys_info.h" | 27 #include "base/sys_info.h" |
28 #include "base/threading/platform_thread.h" | 28 #include "base/threading/platform_thread.h" |
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/navigator_connect/navigator_connect_provider.h" |
37 #include "content/child/notifications/notification_dispatcher.h" | 38 #include "content/child/notifications/notification_dispatcher.h" |
38 #include "content/child/notifications/notification_manager.h" | 39 #include "content/child/notifications/notification_manager.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" |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } | 1074 } |
1074 | 1075 |
1075 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { | 1076 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { |
1076 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) | 1077 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) |
1077 return nullptr; | 1078 return nullptr; |
1078 | 1079 |
1079 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), | 1080 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), |
1080 push_dispatcher_.get()); | 1081 push_dispatcher_.get()); |
1081 } | 1082 } |
1082 | 1083 |
| 1084 blink::WebNavigatorConnectProvider* |
| 1085 BlinkPlatformImpl::navigatorConnectProvider() { |
| 1086 if (!thread_safe_sender_.get()) |
| 1087 return nullptr; |
| 1088 |
| 1089 return NavigatorConnectProvider::ThreadSpecificInstance( |
| 1090 thread_safe_sender_.get(), main_thread_task_runner_); |
| 1091 } |
| 1092 |
1083 WebThemeEngine* BlinkPlatformImpl::themeEngine() { | 1093 WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
1084 return &native_theme_engine_; | 1094 return &native_theme_engine_; |
1085 } | 1095 } |
1086 | 1096 |
1087 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { | 1097 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { |
1088 return &fallback_theme_engine_; | 1098 return &fallback_theme_engine_; |
1089 } | 1099 } |
1090 | 1100 |
1091 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( | 1101 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( |
1092 const blink::WebString& vfs_file_name, int desired_flags) { | 1102 const blink::WebString& vfs_file_name, int desired_flags) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 } | 1247 } |
1238 | 1248 |
1239 // static | 1249 // static |
1240 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1250 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
1241 WebThreadImplForMessageLoop* impl = | 1251 WebThreadImplForMessageLoop* impl = |
1242 static_cast<WebThreadImplForMessageLoop*>(thread); | 1252 static_cast<WebThreadImplForMessageLoop*>(thread); |
1243 delete impl; | 1253 delete impl; |
1244 } | 1254 } |
1245 | 1255 |
1246 } // namespace content | 1256 } // namespace content |
OLD | NEW |