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 <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_url_loader_impl.h" | 53 #include "content/child/web_url_loader_impl.h" |
54 #include "content/child/web_url_request_util.h" | 54 #include "content/child/web_url_request_util.h" |
55 #include "content/child/websocket_bridge.h" | 55 #include "content/child/websocket_bridge.h" |
56 #include "content/child/worker_thread_registry.h" | 56 #include "content/child/worker_thread_registry.h" |
57 #include "content/public/common/content_client.h" | 57 #include "content/public/common/content_client.h" |
| 58 #include "content/public/common/service_registry.h" |
58 #include "net/base/data_url.h" | 59 #include "net/base/data_url.h" |
59 #include "net/base/net_errors.h" | 60 #include "net/base/net_errors.h" |
60 #include "third_party/WebKit/public/platform/WebData.h" | 61 #include "third_party/WebKit/public/platform/WebData.h" |
61 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 62 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
62 #include "third_party/WebKit/public/platform/WebMemoryDumpProvider.h" | 63 #include "third_party/WebKit/public/platform/WebMemoryDumpProvider.h" |
63 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 64 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
64 #include "third_party/WebKit/public/platform/WebString.h" | 65 #include "third_party/WebKit/public/platform/WebString.h" |
65 #include "third_party/WebKit/public/platform/WebURL.h" | 66 #include "third_party/WebKit/public/platform/WebURL.h" |
66 #include "ui/base/layout.h" | 67 #include "ui/base/layout.h" |
67 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" | 68 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 geofencing_provider_.reset(new WebGeofencingProviderImpl( | 388 geofencing_provider_.reset(new WebGeofencingProviderImpl( |
388 ChildThreadImpl::current()->thread_safe_sender())); | 389 ChildThreadImpl::current()->thread_safe_sender())); |
389 thread_safe_sender_ = ChildThreadImpl::current()->thread_safe_sender(); | 390 thread_safe_sender_ = ChildThreadImpl::current()->thread_safe_sender(); |
390 notification_dispatcher_ = | 391 notification_dispatcher_ = |
391 ChildThreadImpl::current()->notification_dispatcher(); | 392 ChildThreadImpl::current()->notification_dispatcher(); |
392 push_dispatcher_ = ChildThreadImpl::current()->push_dispatcher(); | 393 push_dispatcher_ = ChildThreadImpl::current()->push_dispatcher(); |
393 permission_client_.reset(new PermissionDispatcher( | 394 permission_client_.reset(new PermissionDispatcher( |
394 ChildThreadImpl::current()->service_registry())); | 395 ChildThreadImpl::current()->service_registry())); |
395 main_thread_sync_provider_.reset( | 396 main_thread_sync_provider_.reset( |
396 new BackgroundSyncProvider(main_thread_task_runner_.get())); | 397 new BackgroundSyncProvider(main_thread_task_runner_.get())); |
| 398 |
| 399 ServiceRegistry* registry = ChildThreadImpl::current()->service_registry(); |
| 400 registry->ConnectToRemoteService(mojo::GetProxy(&url_loader_factory_)); |
397 } | 401 } |
398 } | 402 } |
399 | 403 |
400 void BlinkPlatformImpl::WaitUntilWebThreadTLSUpdate( | 404 void BlinkPlatformImpl::WaitUntilWebThreadTLSUpdate( |
401 scheduler::WebThreadBase* thread) { | 405 scheduler::WebThreadBase* thread) { |
402 base::WaitableEvent event(false, false); | 406 base::WaitableEvent event(false, false); |
403 thread->GetTaskRunner()->PostTask( | 407 thread->GetTaskRunner()->PostTask( |
404 FROM_HERE, | 408 FROM_HERE, |
405 base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, base::Unretained(this), | 409 base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, base::Unretained(this), |
406 base::Unretained(thread), base::Unretained(&event))); | 410 base::Unretained(thread), base::Unretained(&event))); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( | 1010 return WebString::fromUTF8(ui::KeycodeConverter::DomKeyToKeyString( |
1007 static_cast<ui::DomKey>(dom_key))); | 1011 static_cast<ui::DomKey>(dom_key))); |
1008 } | 1012 } |
1009 | 1013 |
1010 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { | 1014 int BlinkPlatformImpl::domKeyEnumFromString(const WebString& key_string) { |
1011 return static_cast<int>( | 1015 return static_cast<int>( |
1012 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); | 1016 ui::KeycodeConverter::KeyStringToDomKey(key_string.utf8())); |
1013 } | 1017 } |
1014 | 1018 |
1015 } // namespace content | 1019 } // namespace content |
OLD | NEW |