Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Unified Diff: content/browser/renderer_host/shared_memory_allocator_impl.h

Issue 2488913003: Replacing allocate bitmap IPC messages with a new Mojo interface. (Closed)
Patch Set: Clean-up Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/shared_memory_allocator_impl.h
diff --git a/content/browser/renderer_host/shared_memory_allocator_impl.h b/content/browser/renderer_host/shared_memory_allocator_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..34543f8bd44fc7e56dcd9f5754f5afd9ed46db53
--- /dev/null
+++ b/content/browser/renderer_host/shared_memory_allocator_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2016 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 CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_
+#define CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_
+
+#include "base/macros.h"
+#include "base/memory/shared_memory.h"
+#include "content/common/host_shared_bitmap_manager.h"
+#include "content/common/shared_memory_allocator.mojom.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+
+namespace content {
+
+class SharedMemoryAllocatorImpl : public mojom::SharedMemoryAllocator {
+ public:
+ static void Create(mojom::SharedMemoryAllocatorRequest request);
+
+ ~SharedMemoryAllocatorImpl() override;
+
+ private:
+ SharedMemoryAllocatorImpl();
+
+ // mojom::SharedMemoryAllocator implementation:
+ void AllocatedSharedBitmap(mojo::ScopedSharedBufferHandle buffer,
+ const gpu::Mailbox& id) override;
+ void DeletedSharedBitmap(const gpu::Mailbox& id) override;
+
+ HostSharedBitmapManagerClient bitmap_manager_client_;
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedMemoryAllocatorImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDER_HOST_SHARED_MEMORY_ALLOCATOR_H_

Powered by Google App Engine
This is Rietveld 408576698