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

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: fix windows SendMessage annoyance 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
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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 } 1137 }
1138 1138
1139 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() { 1139 blink::WebPushProvider* BlinkPlatformImpl::pushProvider() {
1140 if (!thread_safe_sender_.get() || !push_dispatcher_.get()) 1140 if (!thread_safe_sender_.get() || !push_dispatcher_.get())
1141 return nullptr; 1141 return nullptr;
1142 1142
1143 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(), 1143 return PushProvider::ThreadSpecificInstance(thread_safe_sender_.get(),
1144 push_dispatcher_.get()); 1144 push_dispatcher_.get());
1145 } 1145 }
1146 1146
1147 blink::WebNavigatorConnectProvider* 1147 blink::WebServicePortProvider* BlinkPlatformImpl::createServicePortProvider(
1148 BlinkPlatformImpl::navigatorConnectProvider() { 1148 blink::WebServicePortProviderClient* client) {
1149 if (!thread_safe_sender_.get()) 1149 return new ServicePortProvider(client, main_thread_task_runner_);
1150 return nullptr;
1151
1152 return NavigatorConnectProvider::ThreadSpecificInstance(
1153 thread_safe_sender_.get(), main_thread_task_runner_);
1154 } 1150 }
1155 1151
1156 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() { 1152 blink::WebPermissionClient* BlinkPlatformImpl::permissionClient() {
1157 if (!permission_client_.get()) 1153 if (!permission_client_.get())
1158 return nullptr; 1154 return nullptr;
1159 1155
1160 if (IsMainThread()) 1156 if (IsMainThread())
1161 return permission_client_.get(); 1157 return permission_client_.get();
1162 1158
1163 return PermissionDispatcherThreadProxy::GetThreadInstance( 1159 return PermissionDispatcherThreadProxy::GetThreadInstance(
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( 1326 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString(
1331 static_cast<ui::DomCode>(dom_code))); 1327 static_cast<ui::DomCode>(dom_code)));
1332 } 1328 }
1333 1329
1334 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { 1330 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) {
1335 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( 1331 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode(
1336 code.utf8().data())); 1332 code.utf8().data()));
1337 } 1333 }
1338 1334
1339 } // namespace content 1335 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698