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

Side by Side Diff: services/ui/public/cpp/bitmap/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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_BITMAP_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
6 #define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ 6 #define SERVICES_UI_PUBLIC_CPP_BITMAP_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/shared_memory.h" 14 #include "base/memory/shared_memory.h"
15 #include "cc/ipc/shared_bitmap_manager.mojom.h"
15 #include "cc/resources/shared_bitmap_manager.h" 16 #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" 17 #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h"
18 18
19 namespace content { 19 namespace ui {
20 20
21 class ChildSharedBitmapManager : public cc::SharedBitmapManager { 21 class ChildSharedBitmapManager : public cc::SharedBitmapManager {
22 public: 22 public:
23 explicit ChildSharedBitmapManager( 23 explicit ChildSharedBitmapManager(
24 const scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr>& 24 const scoped_refptr<
25 render_message_filter_ptr); 25 cc::mojom::ThreadSafeSharedBitmapManagerAssociatedPtr>&
26 shared_bitmap_manager_ptr);
26 ~ChildSharedBitmapManager() override; 27 ~ChildSharedBitmapManager() override;
27 28
28 // cc::SharedBitmapManager implementation. 29 // cc::SharedBitmapManager implementation.
29 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap( 30 std::unique_ptr<cc::SharedBitmap> AllocateSharedBitmap(
30 const gfx::Size& size) override; 31 const gfx::Size& size) override;
31 std::unique_ptr<cc::SharedBitmap> GetSharedBitmapFromId( 32 std::unique_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
32 const gfx::Size&, 33 const gfx::Size&,
33 const cc::SharedBitmapId&) override; 34 const cc::SharedBitmapId&) override;
34 35
35 std::unique_ptr<cc::SharedBitmap> GetBitmapForSharedMemory( 36 std::unique_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
36 base::SharedMemory* mem); 37 base::SharedMemory* mem);
37 38
38 private: 39 private:
39 void NotifyAllocatedSharedBitmap(base::SharedMemory* memory, 40 void NotifyAllocatedSharedBitmap(base::SharedMemory* memory,
40 const cc::SharedBitmapId& id); 41 const cc::SharedBitmapId& id);
41 42
42 scoped_refptr<mojom::ThreadSafeRenderMessageFilterAssociatedPtr> 43 scoped_refptr<cc::mojom::ThreadSafeSharedBitmapManagerAssociatedPtr>
43 render_message_filter_ptr_; 44 shared_bitmap_manager_ptr_;
44 45
45 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager); 46 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager);
46 }; 47 };
47 48
48 } // namespace content 49 } // namespace ui
49 50
50 #endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ 51 #endif // SERVICES_UI_PUBLIC_CPP_BITMAP_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/bitmap/BUILD.gn ('k') | services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698