| 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 21 matching lines...) Expand all Loading... |
| 32 #include "content/child/child_thread_impl.h" | 32 #include "content/child/child_thread_impl.h" |
| 33 #include "content/child/content_child_helpers.h" | 33 #include "content/child/content_child_helpers.h" |
| 34 #include "content/child/geofencing/web_geofencing_provider_impl.h" | 34 #include "content/child/geofencing/web_geofencing_provider_impl.h" |
| 35 #include "content/child/navigator_connect/navigator_connect_provider.h" | 35 #include "content/child/navigator_connect/navigator_connect_provider.h" |
| 36 #include "content/child/notifications/notification_dispatcher.h" | 36 #include "content/child/notifications/notification_dispatcher.h" |
| 37 #include "content/child/notifications/notification_manager.h" | 37 #include "content/child/notifications/notification_manager.h" |
| 38 #include "content/child/permissions/permission_manager.h" | 38 #include "content/child/permissions/permission_manager.h" |
| 39 #include "content/child/permissions/permission_manager_thread_proxy.h" | 39 #include "content/child/permissions/permission_manager_thread_proxy.h" |
| 40 #include "content/child/push_messaging/push_dispatcher.h" | 40 #include "content/child/push_messaging/push_dispatcher.h" |
| 41 #include "content/child/push_messaging/push_provider.h" | 41 #include "content/child/push_messaging/push_provider.h" |
| 42 #include "content/child/scheduler/webthread_impl_for_worker.h" |
| 42 #include "content/child/thread_safe_sender.h" | 43 #include "content/child/thread_safe_sender.h" |
| 43 #include "content/child/web_discardable_memory_impl.h" | 44 #include "content/child/web_discardable_memory_impl.h" |
| 44 #include "content/child/web_gesture_curve_impl.h" | 45 #include "content/child/web_gesture_curve_impl.h" |
| 45 #include "content/child/web_url_loader_impl.h" | 46 #include "content/child/web_url_loader_impl.h" |
| 46 #include "content/child/websocket_bridge.h" | 47 #include "content/child/websocket_bridge.h" |
| 47 #include "content/child/webthread_impl.h" | |
| 48 #include "content/child/worker_task_runner.h" | 48 #include "content/child/worker_task_runner.h" |
| 49 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
| 50 #include "net/base/data_url.h" | 50 #include "net/base/data_url.h" |
| 51 #include "net/base/mime_util.h" | 51 #include "net/base/mime_util.h" |
| 52 #include "net/base/net_errors.h" | 52 #include "net/base/net_errors.h" |
| 53 #include "net/base/net_util.h" | 53 #include "net/base/net_util.h" |
| 54 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" | 54 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" |
| 55 #include "third_party/WebKit/public/platform/WebData.h" | 55 #include "third_party/WebKit/public/platform/WebData.h" |
| 56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 56 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 57 #include "third_party/WebKit/public/platform/WebString.h" | 57 #include "third_party/WebKit/public/platform/WebString.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 | 498 |
| 499 bool BlinkPlatformImpl::isReservedIPAddress( | 499 bool BlinkPlatformImpl::isReservedIPAddress( |
| 500 const blink::WebString& host) const { | 500 const blink::WebString& host) const { |
| 501 net::IPAddressNumber address; | 501 net::IPAddressNumber address; |
| 502 if (!net::ParseURLHostnameToNumber(host.utf8(), &address)) | 502 if (!net::ParseURLHostnameToNumber(host.utf8(), &address)) |
| 503 return false; | 503 return false; |
| 504 return net::IsIPAddressReserved(address); | 504 return net::IsIPAddressReserved(address); |
| 505 } | 505 } |
| 506 | 506 |
| 507 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { | 507 blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { |
| 508 WebThreadImpl* thread = new WebThreadImpl(name); | 508 WebThreadImplForWorker* thread = new WebThreadImplForWorker(name); |
| 509 thread->TaskRunner()->PostTask( | 509 thread->TaskRunner()->PostTask( |
| 510 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, | 510 FROM_HERE, base::Bind(&BlinkPlatformImpl::UpdateWebThreadTLS, |
| 511 base::Unretained(this), thread)); | 511 base::Unretained(this), thread)); |
| 512 return thread; | 512 return thread; |
| 513 } | 513 } |
| 514 | 514 |
| 515 blink::WebThread* BlinkPlatformImpl::currentThread() { | 515 blink::WebThread* BlinkPlatformImpl::currentThread() { |
| 516 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); | 516 return static_cast<blink::WebThread*>(current_thread_slot_.Get()); |
| 517 } | 517 } |
| 518 | 518 |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( | 1255 return WebString::fromUTF8(ui::KeycodeConverter::DomCodeToCodeString( |
| 1256 static_cast<ui::DomCode>(dom_code))); | 1256 static_cast<ui::DomCode>(dom_code))); |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { | 1259 int BlinkPlatformImpl::domEnumFromCodeString(const WebString& code) { |
| 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( | 1260 return static_cast<int>(ui::KeycodeConverter::CodeStringToDomCode( |
| 1261 code.utf8().data())); | 1261 code.utf8().data())); |
| 1262 } | 1262 } |
| 1263 | 1263 |
| 1264 } // namespace content | 1264 } // namespace content |
| OLD | NEW |