#ifndef CONTENT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_
#define CONTENT_CHILD_WEB_DISCARDABLE_MEMORY_IMPL_H_
#include "base/basictypes.h"
#include "base/memory/discardable_memory.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/public/platform/WebDiscardableMemory.h"
namespace blink {
class WebDiscardableMemory;
}
namespace content {
class WebDiscardableMemoryImpl : public blink::WebDiscardableMemory {
public:
virtual ~WebDiscardableMemoryImpl();
static scoped_ptr<WebDiscardableMemoryImpl> CreateLockedMemory(size_t size);
virtual bool lock();
virtual void unlock();
virtual void* data();
private:
WebDiscardableMemoryImpl(scoped_ptr<base::DiscardableMemory> memory);
scoped_ptr<base::DiscardableMemory> discardable_;
DISALLOW_COPY_AND_ASSIGN(WebDiscardableMemoryImpl);
};
}
#endif