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

Side by Side Diff: content/child/child_shared_bitmap_manager.h

Issue 2717213004: Move SharedBitmapManager implementation out of content/ (Closed)
Patch Set: rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
6 #define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/shared_memory.h"
15 #include "cc/resources/shared_bitmap_manager.h"
16 #include "content/common/render_message_filter.mojom.h"
17 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h"
18
19 namespace content {
20
21 class ChildSharedBitmapManager : public cc::SharedBitmapManager {
22 public:
23 explicit ChildSharedBitmapManager(
24 const scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr>&
25 render_message_filter_ptr);
26 ~ChildSharedBitmapManager() override;
27
28 // cc::SharedBitmapManager implementation.
29 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap(
30 const gfx::Size& size) override;
31 std::unique_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
32 const gfx::Size&,
33 const cc::SharedBitmapId&) override;
34
35 std::unique_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
36 base::SharedMemory* mem);
37
38 private:
39 void NotifyAllocatedSharedBitmap(base::SharedMemory* memory,
40 const cc::SharedBitmapId& id);
41
42 scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr>
43 render_message_filter_ptr_;
44
45 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
OLDNEW
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698