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
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_
6 #define CONTENT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/WebKit/public/platform/WebDiscardableMemory.h"
13 class DiscardableMemory
;
18 // Implementation of WebDiscardableMemory that is responsible for allocating
19 // discardable memory.
20 class WebDiscardableMemoryImpl
: public blink::WebDiscardableMemory
{
22 virtual ~WebDiscardableMemoryImpl();
24 static scoped_ptr
<WebDiscardableMemoryImpl
> CreateLockedMemory(size_t size
);
26 // blink::WebDiscardableMemory:
28 virtual void unlock();
32 WebDiscardableMemoryImpl(scoped_ptr
<base::DiscardableMemory
> memory
);
34 scoped_ptr
<base::DiscardableMemory
> discardable_
;
36 DISALLOW_COPY_AND_ASSIGN(WebDiscardableMemoryImpl
);
39 } // namespace content
41 #endif // CONTENT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_