| 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 17 matching lines...) Expand all Loading... |
| 28 #include "base/time/time.h" | 28 #include "base/time/time.h" |
| 29 #include "content/child/child_thread.h" | 29 #include "content/child/child_thread.h" |
| 30 #include "content/child/content_child_helpers.h" | 30 #include "content/child/content_child_helpers.h" |
| 31 #include "content/child/fling_curve_configuration.h" | 31 #include "content/child/fling_curve_configuration.h" |
| 32 #include "content/child/web_discardable_memory_impl.h" | 32 #include "content/child/web_discardable_memory_impl.h" |
| 33 #include "content/child/web_socket_stream_handle_impl.h" | 33 #include "content/child/web_socket_stream_handle_impl.h" |
| 34 #include "content/child/web_url_loader_impl.h" | 34 #include "content/child/web_url_loader_impl.h" |
| 35 #include "content/child/websocket_bridge.h" | 35 #include "content/child/websocket_bridge.h" |
| 36 #include "content/child/webthread_impl.h" | 36 #include "content/child/webthread_impl.h" |
| 37 #include "content/child/worker_task_runner.h" | 37 #include "content/child/worker_task_runner.h" |
| 38 #include "content/common/mime_util.h" |
| 38 #include "content/public/common/content_client.h" | 39 #include "content/public/common/content_client.h" |
| 39 #include "grit/blink_resources.h" | 40 #include "grit/blink_resources.h" |
| 40 #include "grit/webkit_resources.h" | 41 #include "grit/webkit_resources.h" |
| 41 #include "grit/webkit_strings.h" | 42 #include "grit/webkit_strings.h" |
| 42 #include "net/base/data_url.h" | 43 #include "net/base/data_url.h" |
| 43 #include "net/base/mime_util.h" | |
| 44 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
| 45 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" | 45 #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h" |
| 46 #include "third_party/WebKit/public/platform/WebData.h" | 46 #include "third_party/WebKit/public/platform/WebData.h" |
| 47 #include "third_party/WebKit/public/platform/WebString.h" | 47 #include "third_party/WebKit/public/platform/WebString.h" |
| 48 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" | 48 #include "third_party/WebKit/public/platform/WebWaitableEvent.h" |
| 49 #include "ui/base/layout.h" | 49 #include "ui/base/layout.h" |
| 50 | 50 |
| 51 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
| 52 #include "content/child/fling_animator_impl_android.h" | 52 #include "content/child/fling_animator_impl_android.h" |
| 53 #endif | 53 #endif |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 WebString BlinkPlatformImpl::userAgent() { | 420 WebString BlinkPlatformImpl::userAgent() { |
| 421 return WebString::fromUTF8(GetContentClient()->GetUserAgent()); | 421 return WebString::fromUTF8(GetContentClient()->GetUserAgent()); |
| 422 } | 422 } |
| 423 | 423 |
| 424 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, | 424 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, |
| 425 WebString& mimetype_out, | 425 WebString& mimetype_out, |
| 426 WebString& charset_out) { | 426 WebString& charset_out) { |
| 427 std::string mime_type, char_set, data; | 427 std::string mime_type, char_set, data; |
| 428 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) | 428 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) |
| 429 && net::IsSupportedMimeType(mime_type)) { | 429 && content::IsSupportedMimeType(mime_type)) { |
| 430 mimetype_out = WebString::fromUTF8(mime_type); | 430 mimetype_out = WebString::fromUTF8(mime_type); |
| 431 charset_out = WebString::fromUTF8(char_set); | 431 charset_out = WebString::fromUTF8(char_set); |
| 432 return data; | 432 return data; |
| 433 } | 433 } |
| 434 return WebData(); | 434 return WebData(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 WebURLError BlinkPlatformImpl::cancelledError( | 437 WebURLError BlinkPlatformImpl::cancelledError( |
| 438 const WebURL& unreachableURL) const { | 438 const WebURL& unreachableURL) const { |
| 439 return WebURLLoaderImpl::CreateError(unreachableURL, false, net::ERR_ABORTED); | 439 return WebURLLoaderImpl::CreateError(unreachableURL, false, net::ERR_ABORTED); |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 // static | 1126 // static |
| 1127 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1127 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
| 1128 WebThreadImplForMessageLoop* impl = | 1128 WebThreadImplForMessageLoop* impl = |
| 1129 static_cast<WebThreadImplForMessageLoop*>(thread); | 1129 static_cast<WebThreadImplForMessageLoop*>(thread); |
| 1130 delete impl; | 1130 delete impl; |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 } // namespace content | 1133 } // namespace content |
| OLD | NEW |