Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: content/child/blink_platform_impl.cc

Issue 1192713004: Update client side navigator.connect API to use ServicePortCollection [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 #include "components/mime_util/mime_util.h" 36 #include "components/mime_util/mime_util.h"
37 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" 37 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
38 #include "content/app/resources/grit/content_resources.h" 38 #include "content/app/resources/grit/content_resources.h"
39 #include "content/app/strings/grit/content_strings.h" 39 #include "content/app/strings/grit/content_strings.h"
40 #include "content/child/background_sync/background_sync_provider.h" 40 #include "content/child/background_sync/background_sync_provider.h"
41 #include "content/child/background_sync/background_sync_provider_thread_proxy.h" 41 #include "content/child/background_sync/background_sync_provider_thread_proxy.h"
42 #include "content/child/bluetooth/web_bluetooth_impl.h" 42 #include "content/child/bluetooth/web_bluetooth_impl.h"
43 #include "content/child/child_thread_impl.h" 43 #include "content/child/child_thread_impl.h"
44 #include "content/child/content_child_helpers.h" 44 #include "content/child/content_child_helpers.h"
45 #include "content/child/geofencing/web_geofencing_provider_impl.h" 45 #include "content/child/geofencing/web_geofencing_provider_impl.h"
46 #include "content/child/navigator_connect/navigator_connect_provider.h" 46 #include "content/child/navigator_connect/service_port_provider.h"
47 #include "content/child/notifications/notification_dispatcher.h" 47 #include "content/child/notifications/notification_dispatcher.h"
48 #include "content/child/notifications/notification_manager.h" 48 #include "content/child/notifications/notification_manager.h"
49 #include "content/child/permissions/permission_dispatcher.h" 49 #include "content/child/permissions/permission_dispatcher.h"
50 #include "content/child/permissions/permission_dispatcher_thread_proxy.h" 50 #include "content/child/permissions/permission_dispatcher_thread_proxy.h"
51 #include "content/child/push_messaging/push_dispatcher.h" 51 #include "content/child/push_messaging/push_dispatcher.h"
52 #include "content/child/push_messaging/push_provider.h" 52 #include "content/child/push_messaging/push_provider.h"
53 #include "content/child/thread_safe_sender.h" 53 #include "content/child/thread_safe_sender.h"
54 #include "content/child/web_discardable_memory_impl.h" 54 #include "content/child/web_discardable_memory_impl.h"
55 #include "content/child/web_memory_dump_provider_adapter.h" 55 #include "content/child/web_memory_dump_provider_adapter.h"
56 #include "content/child/web_process_memory_dump_impl.h" 56 #include "content/child/web_process_memory_dump_impl.h"
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 } 1185 }
1186 1186
1187 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { 1187 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() {
1188 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) 1188 if (!thread_safe_sender_.get() || !push_dispatcher_.get())
1189 return nullptr; 1189 return nullptr;
1190 1190
1191 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), 1191 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(),
1192 push_dispatcher_.get()); 1192 push_dispatcher_.get());
1193 } 1193 }
1194 1194
1195 blink::WebNavigatorConnectProvider* 1195 blink::WebServicePortProvider* BlinkPlatformImpl::createServicePortProvider(
1196 BlinkPlatformImpl::navigatorConnectProvider() { 1196 blink::WebServicePortProviderClient* client) {
1197 if (!thread_safe_sender_.get()) 1197 return new ServicePortProvider(client, main_thread_task_runner_);
1198 return nullptr;
1199
1200 return NavigatorConnectProvider::ThreadSpecificInstance(
1201 thread_safe_sender_.get(), main_thread_task_runner_);
1202 } 1198 }
1203 1199
1204 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() { 1200 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() {
1205 if (!permission_client_.get()) 1201 if (!permission_client_.get())
1206 return nullptr; 1202 return nullptr;
1207 1203
1208 if (IsMainThread()) 1204 if (IsMainThread())
1209 return permission_client_.get(); 1205 return permission_client_.get();
1210 1206
1211 return PermissionDispatcherThreadProxy::GetThreadInstance( 1207 return PermissionDispatcherThreadProxy::GetThreadInstance(
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( 1374 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString(
1379 static_cast<ui::DomCode>(dom_code))); 1375 static_cast<ui::DomCode>(dom_code)));
1380 } 1376 }
1381 1377
1382 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { 1378 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
1383 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( 1379 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode(
1384 code.utf8().data())); 1380 code.utf8().data()));
1385 } 1381 }
1386 1382
1387 } // namespace content 1383 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698