diff options
-rw-r--r-- | webkit/child/web_discardable_memory_impl.cc (renamed from webkit/glue/web_discardable_memory_impl.cc) | 4 | ||||
-rw-r--r-- | webkit/child/web_discardable_memory_impl.h (renamed from webkit/glue/web_discardable_memory_impl.h) | 12 | ||||
-rw-r--r-- | webkit/child/webkitplatformsupport_child_impl.cc | 13 | ||||
-rw-r--r-- | webkit/child/webkitplatformsupport_child_impl.h | 3 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 4 | ||||
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.cc | 13 | ||||
-rw-r--r-- | webkit/glue/webkitplatformsupport_impl.h | 2 |
7 files changed, 26 insertions, 25 deletions
diff --git a/webkit/glue/web_discardable_memory_impl.cc b/webkit/child/web_discardable_memory_impl.cc index d4c3ee2..0e2663c 100644 --- a/webkit/glue/web_discardable_memory_impl.cc +++ b/webkit/child/web_discardable_memory_impl.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/glue/web_discardable_memory_impl.h" +#include "webkit/child/web_discardable_memory_impl.h" namespace webkit_glue { diff --git a/webkit/glue/web_discardable_memory_impl.h b/webkit/child/web_discardable_memory_impl.h index ced8afe..f2ad328 100644 --- a/webkit/glue/web_discardable_memory_impl.h +++ b/webkit/child/web_discardable_memory_impl.h @@ -1,14 +1,14 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_GLUE_WEB_DISCARDABLE_MEMORY_IMPL_H_ -#define WEBKIT_GLUE_WEB_DISCARDABLE_MEMORY_IMPL_H_ +#ifndef WEBKIT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_ +#define WEBKIT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_ #include "base/memory/discardable_memory.h" #include "base/memory/scoped_ptr.h" #include "third_party/WebKit/public/platform/WebDiscardableMemory.h" -#include "webkit/glue/webkit_glue_export.h" +#include "webkit/child/webkit_child_export.h" namespace WebKit { class WebDiscardableMemory; @@ -18,7 +18,7 @@ namespace webkit_glue { // Implementation of WebDiscardableMemory that is responsible for allocating // discardable memory. -class WEBKIT_GLUE_EXPORT WebDiscardableMemoryImpl +class WEBKIT_CHILD_EXPORT WebDiscardableMemoryImpl : NON_EXPORTED_BASE(public WebKit::WebDiscardableMemory) { public: WebDiscardableMemoryImpl(); @@ -41,4 +41,4 @@ class WEBKIT_GLUE_EXPORT WebDiscardableMemoryImpl } // namespace webkit_glue -#endif // WEBKIT_GLUE_WEB_DISCARDABLE_MEMORY_IMPL_H_ +#endif // WEBKIT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_ diff --git a/webkit/child/webkitplatformsupport_child_impl.cc b/webkit/child/webkitplatformsupport_child_impl.cc index 02ee5aa..1df9a12 100644 --- a/webkit/child/webkitplatformsupport_child_impl.cc +++ b/webkit/child/webkitplatformsupport_child_impl.cc @@ -4,8 +4,10 @@ #include "webkit/child/webkitplatformsupport_child_impl.h" +#include "base/memory/discardable_memory.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "webkit/child/fling_curve_configuration.h" +#include "webkit/child/web_discardable_memory_impl.h" #include "webkit/child/webthread_impl.h" #include "webkit/child/worker_task_runner.h" @@ -89,6 +91,17 @@ void WebKitPlatformSupportChildImpl::didStopWorkerRunLoop( worker_task_runner->OnWorkerRunLoopStopped(runLoop); } +WebKit::WebDiscardableMemory* +WebKitPlatformSupportChildImpl::allocateAndLockDiscardableMemory(size_t bytes) { + if (!base::DiscardableMemory::Supported()) + return NULL; + scoped_ptr<WebDiscardableMemoryImpl> discardable( + new WebDiscardableMemoryImpl()); + if (discardable->InitializeAndLock(bytes)) + return discardable.release(); + return NULL; +} + // static void WebKitPlatformSupportChildImpl::DestroyCurrentThread(void* thread) { WebThreadImplForMessageLoop* impl = diff --git a/webkit/child/webkitplatformsupport_child_impl.h b/webkit/child/webkitplatformsupport_child_impl.h index 21812b2..abb6338 100644 --- a/webkit/child/webkitplatformsupport_child_impl.h +++ b/webkit/child/webkitplatformsupport_child_impl.h @@ -51,6 +51,9 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportChildImpl : virtual void didStopWorkerRunLoop( const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; + virtual WebKit::WebDiscardableMemory* allocateAndLockDiscardableMemory( + size_t bytes); + private: static void DestroyCurrentThread(void*); diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 0af16f2..129a931 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -86,6 +86,8 @@ '../child/fling_curve_configuration.h', '../child/touch_fling_gesture_curve.cc', '../child/touch_fling_gesture_curve.h', + '../child/web_discardable_memory_impl.cc', + '../child/web_discardable_memory_impl.h', '../child/webfallbackthemeengine_impl.cc', '../child/webfallbackthemeengine_impl.h', '../child/webkit_child_export.h', @@ -287,8 +289,6 @@ 'scoped_clipboard_writer_glue.h', 'simple_webmimeregistry_impl.cc', 'simple_webmimeregistry_impl.h', - 'web_discardable_memory_impl.cc', - 'web_discardable_memory_impl.h', 'webclipboard_impl.cc', 'webclipboard_impl.h', 'webcookie.cc', diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc index 8a150fa..129664b 100644 --- a/webkit/glue/webkitplatformsupport_impl.cc +++ b/webkit/glue/webkitplatformsupport_impl.cc @@ -10,7 +10,6 @@ #include "base/allocator/allocator_extension.h" #include "base/bind.h" -#include "base/memory/discardable_memory.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/message_loop.h" @@ -45,7 +44,6 @@ #include "ui/base/layout.h" #include "webkit/base/file_path_string_conversions.h" #include "webkit/common/user_agent/user_agent.h" -#include "webkit/glue/web_discardable_memory_impl.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/websocketstreamhandle_impl.h" #include "webkit/glue/weburlloader_impl.h" @@ -921,17 +919,6 @@ void WebKitPlatformSupportImpl::ResumeSharedTimer() { } } -WebKit::WebDiscardableMemory* - WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { - if (!base::DiscardableMemory::Supported()) - return NULL; - scoped_ptr<WebDiscardableMemoryImpl> discardable( - new WebDiscardableMemoryImpl()); - if (discardable->InitializeAndLock(bytes)) - return discardable.release(); - return NULL; -} - #if defined(OS_ANDROID) webkit_media::WebAudioMediaCodecRunner WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { diff --git a/webkit/glue/webkitplatformsupport_impl.h b/webkit/glue/webkitplatformsupport_impl.h index 75400b8..9dab250 100644 --- a/webkit/glue/webkitplatformsupport_impl.h +++ b/webkit/glue/webkitplatformsupport_impl.h @@ -114,8 +114,6 @@ class WEBKIT_GLUE_EXPORT WebKitPlatformSupportImpl : virtual void setSharedTimerFireInterval(double interval_seconds); virtual void stopSharedTimer(); virtual void callOnMainThread(void (*func)(void*), void* context); - virtual WebKit::WebDiscardableMemory* allocateAndLockDiscardableMemory( - size_t bytes); // Embedder functions. The following are not implemented by the glue layer and |