OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "third_party/WebKit/public/platform/WebURL.h" | 43 #include "third_party/WebKit/public/platform/WebURL.h" |
44 #include "third_party/WebKit/public/platform/WebVector.h" | 44 #include "third_party/WebKit/public/platform/WebVector.h" |
45 #include "ui/base/layout.h" | 45 #include "ui/base/layout.h" |
46 #include "webkit/base/file_path_string_conversions.h" | 46 #include "webkit/base/file_path_string_conversions.h" |
47 #include "webkit/common/user_agent/user_agent.h" | 47 #include "webkit/common/user_agent/user_agent.h" |
48 #include "webkit/glue/web_discardable_memory_impl.h" | 48 #include "webkit/glue/web_discardable_memory_impl.h" |
49 #include "webkit/glue/webkit_glue.h" | 49 #include "webkit/glue/webkit_glue.h" |
50 #include "webkit/glue/websocketstreamhandle_impl.h" | 50 #include "webkit/glue/websocketstreamhandle_impl.h" |
51 #include "webkit/glue/webthread_impl.h" | 51 #include "webkit/glue/webthread_impl.h" |
52 #include "webkit/glue/weburlloader_impl.h" | 52 #include "webkit/glue/weburlloader_impl.h" |
53 #include "webkit/glue/worker_task_runner.h" | |
54 #include "webkit/plugins/npapi/plugin_instance.h" | 53 #include "webkit/plugins/npapi/plugin_instance.h" |
55 #include "webkit/plugins/webplugininfo.h" | 54 #include "webkit/plugins/webplugininfo.h" |
56 #include "webkit/renderer/media/audio_decoder.h" | 55 #include "webkit/renderer/media/audio_decoder.h" |
57 | 56 |
58 using WebKit::WebAudioBus; | 57 using WebKit::WebAudioBus; |
59 using WebKit::WebCookie; | 58 using WebKit::WebCookie; |
60 using WebKit::WebData; | 59 using WebKit::WebData; |
61 using WebKit::WebFallbackThemeEngine; | 60 using WebKit::WebFallbackThemeEngine; |
62 using WebKit::WebLocalizedString; | 61 using WebKit::WebLocalizedString; |
63 using WebKit::WebPluginListBuilder; | 62 using WebKit::WebPluginListBuilder; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 } | 953 } |
955 } | 954 } |
956 | 955 |
957 // static | 956 // static |
958 void WebKitPlatformSupportImpl::DestroyCurrentThread(void* thread) { | 957 void WebKitPlatformSupportImpl::DestroyCurrentThread(void* thread) { |
959 WebThreadImplForMessageLoop* impl = | 958 WebThreadImplForMessageLoop* impl = |
960 static_cast<WebThreadImplForMessageLoop*>(thread); | 959 static_cast<WebThreadImplForMessageLoop*>(thread); |
961 delete impl; | 960 delete impl; |
962 } | 961 } |
963 | 962 |
964 void WebKitPlatformSupportImpl::didStartWorkerRunLoop( | |
965 const WebKit::WebWorkerRunLoop& runLoop) { | |
966 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | |
967 worker_task_runner->OnWorkerRunLoopStarted(runLoop); | |
968 } | |
969 | |
970 void WebKitPlatformSupportImpl::didStopWorkerRunLoop( | |
971 const WebKit::WebWorkerRunLoop& runLoop) { | |
972 WorkerTaskRunner* worker_task_runner = WorkerTaskRunner::Instance(); | |
973 worker_task_runner->OnWorkerRunLoopStopped(runLoop); | |
974 } | |
975 | |
976 WebKit::WebDiscardableMemory* | 963 WebKit::WebDiscardableMemory* |
977 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { | 964 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { |
978 if (!base::DiscardableMemory::Supported()) | 965 if (!base::DiscardableMemory::Supported()) |
979 return NULL; | 966 return NULL; |
980 scoped_ptr<WebDiscardableMemoryImpl> discardable( | 967 scoped_ptr<WebDiscardableMemoryImpl> discardable( |
981 new WebDiscardableMemoryImpl()); | 968 new WebDiscardableMemoryImpl()); |
982 if (discardable->InitializeAndLock(bytes)) | 969 if (discardable->InitializeAndLock(bytes)) |
983 return discardable.release(); | 970 return discardable.release(); |
984 return NULL; | 971 return NULL; |
985 } | 972 } |
986 | 973 |
987 #if defined(OS_ANDROID) | 974 #if defined(OS_ANDROID) |
988 webkit_media::WebAudioMediaCodecRunner | 975 webkit_media::WebAudioMediaCodecRunner |
989 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { | 976 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { |
990 return base::Bind(&NullRunWebAudioMediaCodec); | 977 return base::Bind(&NullRunWebAudioMediaCodec); |
991 } | 978 } |
992 #endif | 979 #endif |
993 | 980 |
994 } // namespace webkit_glue | 981 } // namespace webkit_glue |
OLD | NEW |