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 1023 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 blink::WebNavigatorConnectProvider* |
| 1082 BlinkPlatformImpl::navigatorConnectProvider() { |
| 1083 if (!thread_safe_sender_.get()) |
| 1084 return nullptr; |
| 1085 |
| 1086 return NavigatorConnectProvider::ThreadSpecificInstance( |
| 1087 thread_safe_sender_.get()); |
| 1088 } |
| 1089 |
1080 WebThemeEngine* BlinkPlatformImpl::themeEngine() { | 1090 WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
1081 return &native_theme_engine_; | 1091 return &native_theme_engine_; |
1082 } | 1092 } |
1083 | 1093 |
1084 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { | 1094 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { |
1085 return &fallback_theme_engine_; | 1095 return &fallback_theme_engine_; |
1086 } | 1096 } |
1087 | 1097 |
1088 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( | 1098 blink::Platform::FileHandle BlinkPlatformImpl::databaseOpenFile( |
1089 const blink::WebString& vfs_file_name, int desired_flags) { | 1099 const blink::WebString& vfs_file_name, int desired_flags) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 } | 1244 } |
1235 | 1245 |
1236 // static | 1246 // static |
1237 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1247 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
1238 WebThreadImplForMessageLoop* impl = | 1248 WebThreadImplForMessageLoop* impl = |
1239 static_cast<WebThreadImplForMessageLoop*>(thread); | 1249 static_cast<WebThreadImplForMessageLoop*>(thread); |
1240 delete impl; | 1250 delete impl; |
1241 } | 1251 } |
1242 | 1252 |
1243 } // namespace content | 1253 } // namespace content |
OLD | NEW |