| 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 14 matching lines...) Expand all Loading... |
| 25 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
| 26 #include "base/synchronization/lock.h" | 26 #include "base/synchronization/lock.h" |
| 27 #include "base/synchronization/waitable_event.h" | 27 #include "base/synchronization/waitable_event.h" |
| 28 #include "base/sys_info.h" | 28 #include "base/sys_info.h" |
| 29 #include "base/time/time.h" | 29 #include "base/time/time.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/webcrypto/webcrypto_impl.h" | |
| 36 #include "content/child/websocket_bridge.h" | 35 #include "content/child/websocket_bridge.h" |
| 37 #include "content/child/webthread_impl.h" | 36 #include "content/child/webthread_impl.h" |
| 38 #include "content/child/worker_task_runner.h" | 37 #include "content/child/worker_task_runner.h" |
| 39 #include "content/public/common/content_client.h" | 38 #include "content/public/common/content_client.h" |
| 40 #include "grit/blink_resources.h" | 39 #include "grit/blink_resources.h" |
| 41 #include "grit/webkit_resources.h" | 40 #include "grit/webkit_resources.h" |
| 42 #include "grit/webkit_strings.h" | 41 #include "grit/webkit_strings.h" |
| 43 #include "net/base/data_url.h" | 42 #include "net/base/data_url.h" |
| 44 #include "net/base/mime_util.h" | 43 #include "net/base/mime_util.h" |
| 45 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | 899 worker_task_runner->OnWorkerRunLoopStarted(runLoop); |
| 901 } | 900 } |
| 902 | 901 |
| 903 void BlinkPlatformImpl::didStopWorkerRunLoop( | 902 void BlinkPlatformImpl::didStopWorkerRunLoop( |
| 904 const blink::WebWorkerRunLoop& runLoop) { | 903 const blink::WebWorkerRunLoop& runLoop) { |
| 905 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | 904 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); |
| 906 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | 905 worker_task_runner->OnWorkerRunLoopStopped(runLoop); |
| 907 } | 906 } |
| 908 | 907 |
| 909 blink::WebCrypto* BlinkPlatformImpl::crypto() { | 908 blink::WebCrypto* BlinkPlatformImpl::crypto() { |
| 910 if (!web_crypto_) | 909 WebCryptoImpl::EnsureInit(); |
| 911 web_crypto_.reset(new WebCryptoImpl()); | 910 return &web_crypto_; |
| 912 return web_crypto_.get(); | |
| 913 } | 911 } |
| 914 | 912 |
| 915 | 913 |
| 916 WebThemeEngine* BlinkPlatformImpl::themeEngine() { | 914 WebThemeEngine* BlinkPlatformImpl::themeEngine() { |
| 917 return &native_theme_engine_; | 915 return &native_theme_engine_; |
| 918 } | 916 } |
| 919 | 917 |
| 920 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { | 918 WebFallbackThemeEngine* BlinkPlatformImpl::fallbackThemeEngine() { |
| 921 return &fallback_theme_engine_; | 919 return &fallback_theme_engine_; |
| 922 } | 920 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 } | 1092 } |
| 1095 | 1093 |
| 1096 // static | 1094 // static |
| 1097 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { | 1095 void BlinkPlatformImpl::DestroyCurrentThread(void* thread) { |
| 1098 WebThreadImplForMessageLoop* impl = | 1096 WebThreadImplForMessageLoop* impl = |
| 1099 static_cast<WebThreadImplForMessageLoop*>(thread); | 1097 static_cast<WebThreadImplForMessageLoop*>(thread); |
| 1100 delete impl; | 1098 delete impl; |
| 1101 } | 1099 } |
| 1102 | 1100 |
| 1103 } // namespace content | 1101 } // namespace content |
| OLD | NEW |