| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "content/child/notifications/notification_dispatcher.h" | 43 #include "content/child/notifications/notification_dispatcher.h" |
| 44 #include "content/child/notifications/notification_manager.h" | 44 #include "content/child/notifications/notification_manager.h" |
| 45 #include "content/child/push_messaging/push_provider.h" | 45 #include "content/child/push_messaging/push_provider.h" |
| 46 #include "content/child/thread_safe_sender.h" | 46 #include "content/child/thread_safe_sender.h" |
| 47 #include "content/child/web_url_loader_impl.h" | 47 #include "content/child/web_url_loader_impl.h" |
| 48 #include "content/child/web_url_request_util.h" | 48 #include "content/child/web_url_request_util.h" |
| 49 #include "content/child/worker_thread_registry.h" | 49 #include "content/child/worker_thread_registry.h" |
| 50 #include "content/public/common/content_client.h" | 50 #include "content/public/common/content_client.h" |
| 51 #include "content/public/common/service_manager_connection.h" | 51 #include "content/public/common/service_manager_connection.h" |
| 52 #include "net/base/net_errors.h" | 52 #include "net/base/net_errors.h" |
| 53 #include "services/service_manager/public/cpp/connector.h" | |
| 54 #include "services/service_manager/public/interfaces/connector.mojom.h" | |
| 55 #include "third_party/WebKit/public/platform/WebData.h" | 53 #include "third_party/WebKit/public/platform/WebData.h" |
| 56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 54 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 57 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 55 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
| 58 #include "third_party/WebKit/public/platform/WebString.h" | 56 #include "third_party/WebKit/public/platform/WebString.h" |
| 59 #include "third_party/WebKit/public/platform/WebURL.h" | 57 #include "third_party/WebKit/public/platform/WebURL.h" |
| 60 #include "third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_
worker_scheduler.h" | 58 #include "third_party/WebKit/public/platform/scheduler/child/webthread_impl_for_
worker_scheduler.h" |
| 61 #include "ui/base/layout.h" | 59 #include "ui/base/layout.h" |
| 62 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" | 60 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" |
| 63 #include "ui/events/keycodes/dom/keycode_converter.h" | 61 #include "ui/events/keycodes/dom/keycode_converter.h" |
| 64 | 62 |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 long long BlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( | 777 long long BlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( |
| 780 const blink::WebSecurityOrigin& origin) { | 778 const blink::WebSecurityOrigin& origin) { |
| 781 return 0; | 779 return 0; |
| 782 } | 780 } |
| 783 | 781 |
| 784 bool BlinkPlatformImpl::databaseSetFileSize( | 782 bool BlinkPlatformImpl::databaseSetFileSize( |
| 785 const blink::WebString& vfs_file_name, long long size) { | 783 const blink::WebString& vfs_file_name, long long size) { |
| 786 return false; | 784 return false; |
| 787 } | 785 } |
| 788 | 786 |
| 789 void BlinkPlatformImpl::bindServiceConnector( | |
| 790 mojo::ScopedMessagePipeHandle remote_handle) { | |
| 791 if (!ChildThreadImpl::current()) | |
| 792 return; | |
| 793 | |
| 794 service_manager::mojom::ConnectorRequest chromium_request; | |
| 795 chromium_request.Bind(std::move(remote_handle)); | |
| 796 ChildThreadImpl::current() | |
| 797 ->GetServiceManagerConnection() | |
| 798 ->GetConnector() | |
| 799 ->BindConnectorRequest(std::move(chromium_request)); | |
| 800 } | |
| 801 | |
| 802 size_t BlinkPlatformImpl::actualMemoryUsageMB() { | 787 size_t BlinkPlatformImpl::actualMemoryUsageMB() { |
| 803 return GetMemoryUsageKB() >> 10; | 788 return GetMemoryUsageKB() >> 10; |
| 804 } | 789 } |
| 805 | 790 |
| 806 size_t BlinkPlatformImpl::numberOfProcessors() { | 791 size_t BlinkPlatformImpl::numberOfProcessors() { |
| 807 return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); | 792 return static_cast<size_t>(base::SysInfo::NumberOfProcessors()); |
| 808 } | 793 } |
| 809 | 794 |
| 810 size_t BlinkPlatformImpl::maxDecodedImageBytes() { | 795 size_t BlinkPlatformImpl::maxDecodedImageBytes() { |
| 811 #if defined(OS_ANDROID) | 796 #if defined(OS_ANDROID) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 blink::WebFeaturePolicy* BlinkPlatformImpl::duplicateFeaturePolicyWithOrigin( | 858 blink::WebFeaturePolicy* BlinkPlatformImpl::duplicateFeaturePolicyWithOrigin( |
| 874 const blink::WebFeaturePolicy& policy, | 859 const blink::WebFeaturePolicy& policy, |
| 875 const blink::WebSecurityOrigin& new_origin) { | 860 const blink::WebSecurityOrigin& new_origin) { |
| 876 std::unique_ptr<FeaturePolicy> new_policy = | 861 std::unique_ptr<FeaturePolicy> new_policy = |
| 877 FeaturePolicy::CreateFromPolicyWithOrigin( | 862 FeaturePolicy::CreateFromPolicyWithOrigin( |
| 878 static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin)); | 863 static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin)); |
| 879 return new_policy.release(); | 864 return new_policy.release(); |
| 880 } | 865 } |
| 881 | 866 |
| 882 } // namespace content | 867 } // namespace content |
| OLD | NEW |