OLD | NEW |
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 CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ |
6 #define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ | 6 #define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
11 #include "cc/resources/shared_bitmap_manager.h" | 14 #include "cc/resources/shared_bitmap_manager.h" |
12 #include "content/child/thread_safe_sender.h" | 15 #include "content/child/thread_safe_sender.h" |
13 | 16 |
14 namespace content { | 17 namespace content { |
15 | 18 |
16 class SharedMemoryBitmap : public cc::SharedBitmap { | 19 class SharedMemoryBitmap : public cc::SharedBitmap { |
17 public: | 20 public: |
18 base::SharedMemory* shared_memory() { return shared_memory_; } | 21 base::SharedMemory* shared_memory() { return shared_memory_; } |
19 | 22 |
20 protected: | 23 protected: |
21 SharedMemoryBitmap(uint8* pixels, | 24 SharedMemoryBitmap(uint8_t* pixels, |
22 const cc::SharedBitmapId& id, | 25 const cc::SharedBitmapId& id, |
23 base::SharedMemory* shared_memory); | 26 base::SharedMemory* shared_memory); |
24 | 27 |
25 base::SharedMemory* shared_memory_; | 28 base::SharedMemory* shared_memory_; |
26 }; | 29 }; |
27 | 30 |
28 class ChildSharedBitmapManager : public cc::SharedBitmapManager { | 31 class ChildSharedBitmapManager : public cc::SharedBitmapManager { |
29 public: | 32 public: |
30 ChildSharedBitmapManager(scoped_refptr<ThreadSafeSender> sender); | 33 ChildSharedBitmapManager(scoped_refptr<ThreadSafeSender> sender); |
31 ~ChildSharedBitmapManager() override; | 34 ~ChildSharedBitmapManager() override; |
(...skipping 12 matching lines...) Expand all Loading... |
44 | 47 |
45 private: | 48 private: |
46 scoped_refptr<ThreadSafeSender> sender_; | 49 scoped_refptr<ThreadSafeSender> sender_; |
47 | 50 |
48 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager); | 51 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager); |
49 }; | 52 }; |
50 | 53 |
51 } // namespace content | 54 } // namespace content |
52 | 55 |
53 #endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ | 56 #endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_ |
OLD | NEW |