Chromium Code Reviews| Index: mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.h |
| diff --git a/mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.h b/mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..70b0b3390090d50aa988a8570f1c2f361ddaa3c8 |
| --- /dev/null |
| +++ b/mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 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 MOJO_SERVICES_HTML_VIEWER_HTML_VIEWER_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_ |
| +#define MOJO_SERVICES_HTML_VIEWER_HTML_VIEWER_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_ |
| + |
| +#include "base/memory/discardable_memory_shmem_allocator.h" |
| + |
| +namespace html_viewer { |
| + |
| +// This is a copy of the testing allocator, which doesn't actually do any |
|
jamesr
2015/03/16 23:47:25
statements about history are not very useful in co
|
| +// tricks with shared memory. It is the minimal interface needed to get a |
| +// Google search working in the html viewer. |
| +class HtmlViewerDiscardableMemoryShmemAllocator |
|
jamesr
2015/03/16 23:47:25
you're in the directory html_viewer and in the nam
|
| + : public base::DiscardableMemoryShmemAllocator { |
| + public: |
| + HtmlViewerDiscardableMemoryShmemAllocator(); |
| + ~HtmlViewerDiscardableMemoryShmemAllocator() override; |
| + |
| + // Overridden from DiscardableMemoryShmemAllocator: |
| + scoped_ptr<base::DiscardableMemoryShmemChunk> AllocateLockedDiscardableMemory( |
| + size_t size) override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(HtmlViewerDiscardableMemoryShmemAllocator); |
| +}; |
| + |
| +} // namespace html_viewer |
| + |
| +#endif // MOJO_SERVICES_HTML_VIEWER_HTML_VIEWER_DISCARDABLE_MEMORY_SHMEM_ALLOCATOR_H_ |