| 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 24 matching lines...) Expand all Loading... |
| 35 #include "components/mime_util/mime_util.h" | 35 #include "components/mime_util/mime_util.h" |
| 36 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" | 36 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" |
| 37 #include "content/app/resources/grit/content_resources.h" | 37 #include "content/app/resources/grit/content_resources.h" |
| 38 #include "content/app/strings/grit/content_strings.h" | 38 #include "content/app/strings/grit/content_strings.h" |
| 39 #include "content/child/background_sync/background_sync_provider.h" | 39 #include "content/child/background_sync/background_sync_provider.h" |
| 40 #include "content/child/background_sync/background_sync_provider_thread_proxy.h" | 40 #include "content/child/background_sync/background_sync_provider_thread_proxy.h" |
| 41 #include "content/child/bluetooth/web_bluetooth_impl.h" | 41 #include "content/child/bluetooth/web_bluetooth_impl.h" |
| 42 #include "content/child/child_thread_impl.h" | 42 #include "content/child/child_thread_impl.h" |
| 43 #include "content/child/content_child_helpers.h" | 43 #include "content/child/content_child_helpers.h" |
| 44 #include "content/child/geofencing/web_geofencing_provider_impl.h" | 44 #include "content/child/geofencing/web_geofencing_provider_impl.h" |
| 45 #include "content/child/navigator_connect/navigator_connect_provider.h" | 45 #include "content/child/navigator_connect/service_port_provider.h" |
| 46 #include "content/child/notifications/notification_dispatcher.h" | 46 #include "content/child/notifications/notification_dispatcher.h" |
| 47 #include "content/child/notifications/notification_manager.h" | 47 #include "content/child/notifications/notification_manager.h" |
| 48 #include "content/child/permissions/permission_dispatcher.h" | 48 #include "content/child/permissions/permission_dispatcher.h" |
| 49 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" | 49 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" |
| 50 #include "content/child/push_messaging/push_dispatcher.h" | 50 #include "content/child/push_messaging/push_dispatcher.h" |
| 51 #include "content/child/push_messaging/push_provider.h" | 51 #include "content/child/push_messaging/push_provider.h" |
| 52 #include "content/child/thread_safe_sender.h" | 52 #include "content/child/thread_safe_sender.h" |
| 53 #include "content/child/web_discardable_memory_impl.h" | 53 #include "content/child/web_discardable_memory_impl.h" |
| 54 #include "content/child/web_memory_dump_provider_adapter.h" | 54 #include "content/child/web_memory_dump_provider_adapter.h" |
| 55 #include "content/child/web_process_memory_dump_impl.h" | 55 #include "content/child/web_process_memory_dump_impl.h" |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { | 1138 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { |
| 1139 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) | 1139 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) |
| 1140 return nullptr; | 1140 return nullptr; |
| 1141 | 1141 |
| 1142 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), | 1142 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), |
| 1143 push_dispatcher_.get()); | 1143 push_dispatcher_.get()); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 blink::WebNavigatorConnectProvider* | 1146 blink::WebServicePortProvider* BlinkPlatformImpl::createServicePortProvider( |
| 1147 BlinkPlatformImpl::navigatorConnectProvider() { | 1147 blink::WebServicePortProviderClient* client) { |
| 1148 if (!thread_safe_sender_.get()) | 1148 return new ServicePortProvider(client, main_thread_task_runner_); |
| 1149 return nullptr; | |
| 1150 | |
| 1151 return NavigatorConnectProvider::ThreadSpecificInstance( | |
| 1152 thread_safe_sender_.get(), main_thread_task_runner_); | |
| 1153 } | 1149 } |
| 1154 | 1150 |
| 1155 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() { | 1151 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() { |
| 1156 if (!permission_client_.get()) | 1152 if (!permission_client_.get()) |
| 1157 return nullptr; | 1153 return nullptr; |
| 1158 | 1154 |
| 1159 if (IsMainThread()) | 1155 if (IsMainThread()) |
| 1160 return permission_client_.get(); | 1156 return permission_client_.get(); |
| 1161 | 1157 |
| 1162 return PermissionDispatcherThreadProxy::GetThreadInstance( | 1158 return PermissionDispatcherThreadProxy::GetThreadInstance( |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1319 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1324 static_cast<ui::DomCode>(dom_code))); | 1320 static_cast<ui::DomCode>(dom_code))); |
| 1325 } | 1321 } |
| 1326 | 1322 |
| 1327 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1323 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1328 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1324 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1329 code.utf8().data())); | 1325 code.utf8().data())); |
| 1330 } | 1326 } |
| 1331 | 1327 |
| 1332 } // namespace content | 1328 } // namespace content |
| OLD | NEW |