Fix max_samples in command buffer capabilities.
[chromium-blink-merge.git] / content / child / web_discardable_memory_impl.h
blobd83b1c0706ff0c007e0b07a2cf84bab8c5ffe1d6
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"
12 namespace base {
13 class DiscardableMemory;
16 namespace content {
18 // Implementation of WebDiscardableMemory that is responsible for allocating
19 // discardable memory.
20 class WebDiscardableMemoryImpl : public blink::WebDiscardableMemory {
21 public:
22 virtual ~WebDiscardableMemoryImpl();
24 static scoped_ptr<WebDiscardableMemoryImpl> CreateLockedMemory(size_t size);
26 // blink::WebDiscardableMemory:
27 virtual bool lock();
28 virtual void unlock();
29 virtual void* data();
31 private:
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_