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

Unified Diff: components/discardable_memory/service/discardable_shared_memory_manager_proxy.h

Issue 2485623002: discardable_memory: Using mojo IPC to replace Chrome IPC (Closed)
Patch Set: Address review issues. 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: components/discardable_memory/service/discardable_shared_memory_manager_proxy.h
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager_proxy.h b/components/discardable_memory/service/discardable_shared_memory_manager_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..0999297e5c535c5e9f55d4a34bf59e77e6657d84
--- /dev/null
+++ b/components/discardable_memory/service/discardable_shared_memory_manager_proxy.h
@@ -0,0 +1,45 @@
+// 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 COMPONENTS_DISCARDABLE_MEMORY_SERVICE_DISCARDABLE_SHARED_MEMORY_MANAGER_PROXY_H_
+#define COMPONENTS_DISCARDABLE_MEMORY_SERVICE_DISCARDABLE_SHARED_MEMORY_MANAGER_PROXY_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "components/discardable_memory/common/discardable_memory_export.h"
+#include "components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom.h"
+
+namespace discardable_memory {
+
+class DiscardableSharedMemoryManager;
+
+class DISCARDABLE_MEMORY_EXPORT DiscardableSharedMemoryManagerProxy
+ : public NON_EXPORTED_BASE(mojom::DiscardableSharedMemoryManager) {
+ public:
+ DiscardableSharedMemoryManagerProxy();
+ ~DiscardableSharedMemoryManagerProxy() override;
+
+ static void Create(mojom::DiscardableSharedMemoryManagerRequest request);
reveman 2016/11/15 16:13:20 Can you replace this with a DiscardableSharedMemor
Peng 2016/11/15 19:04:05 Done.
+
+ // mojom::DiscardableSharedMemoryManager overrides:
+ void AllocateLockedDiscardableSharedMemory(
+ uint32_t size,
+ int32_t id,
+ const AllocateLockedDiscardableSharedMemoryCallback& callback) override;
+ void DeletedDiscardableSharedMemory(int32_t id) override;
+
+ private:
+ static int last_client_id_;
+
+ const int32_t client_id_;
+ ::discardable_memory::DiscardableSharedMemoryManager* manager_;
reveman 2016/11/15 16:13:20 nit: ..Manager* const manager_;
Peng 2016/11/15 19:04:05 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(DiscardableSharedMemoryManagerProxy);
+};
+
+} // namespace discardable_memory
+
+#endif // COMPONENTS_DISCARDABLE_MEMORY_SERVICE_DISCARDABLE_SHARED_MEMORY_MANAGER_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698