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

Unified Diff: content/child/child_shared_bitmap_manager.h

Issue 148243013: Add shared bitmap managers for browser and renderer processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months 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/child/child_shared_bitmap_manager.h
diff --git a/content/child/child_shared_bitmap_manager.h b/content/child/child_shared_bitmap_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..1e5446640441136c98a92e970ca95e7fa164fb00
--- /dev/null
+++ b/content/child/child_shared_bitmap_manager.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 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_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
+#define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory.h"
+#include "cc/resources/shared_bitmap_manager.h"
+#include "content/child/thread_safe_sender.h"
+
+namespace content {
+
+class ChildSharedBitmapManager : public cc::SharedBitmapManager {
+ public:
+ ChildSharedBitmapManager(scoped_refptr<ThreadSafeSender> sender);
+ virtual ~ChildSharedBitmapManager();
+
+ virtual scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap(
+ const gfx::Size& size) OVERRIDE;
+ virtual scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
+ const gfx::Size&,
+ const cc::SharedBitmapId&) OVERRIDE;
+ virtual scoped_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
+ base::SharedMemory* mem) OVERRIDE;
+
+ private:
+ void FreeSharedMemory(cc::SharedBitmap* bitmap);
+ void ReleaseSharedBitmap(cc::SharedBitmap*);
+
+ scoped_refptr<ThreadSafeSender> sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698