| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_ |
| 6 #define CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/shared_memory.h" |
| 10 #include "content/common/host_shared_bitmap_manager.h" |
| 11 #include "content/common/shared_memory_allocator.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/interface_request.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class SharedMemoryAllocatorImpl : public mojom::SharedMemoryAllocator { |
| 17 public: |
| 18 static void Create(mojom::SharedMemoryAllocatorRequest request); |
| 19 |
| 20 ~SharedMemoryAllocatorImpl() override; |
| 21 |
| 22 private: |
| 23 SharedMemoryAllocatorImpl(); |
| 24 |
| 25 // mojom::SharedMemoryAllocator implementation: |
| 26 void AllocatedSharedBitmap(mojo::ScopedSharedBufferHandle buffer, |
| 27 const gpu::Mailbox& id) override; |
| 28 void DeletedSharedBitmap(const gpu::Mailbox& id) override; |
| 29 |
| 30 HostSharedBitmapManagerClient bitmap_manager_client_; |
| 31 base::ThreadChecker thread_checker_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(SharedMemoryAllocatorImpl); |
| 34 }; |
| 35 |
| 36 } // namespace content |
| 37 |
| 38 #endif // CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_ |
| OLD | NEW |