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_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ |
6 #define CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ | 6 #define CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 static HostSharedBitmapManager* current(); | 66 static HostSharedBitmapManager* current(); |
67 | 67 |
68 // cc::SharedBitmapManager implementation. | 68 // cc::SharedBitmapManager implementation. |
69 scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap( | 69 scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap( |
70 const gfx::Size& size) override; | 70 const gfx::Size& size) override; |
71 scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId( | 71 scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId( |
72 const gfx::Size& size, | 72 const gfx::Size& size, |
73 const cc::SharedBitmapId&) override; | 73 const cc::SharedBitmapId&) override; |
74 | 74 |
75 // base::trace_event::MemoryDumpProvider implementation. | 75 // base::trace_event::MemoryDumpProvider implementation. |
76 bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override; | 76 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 77 base::trace_event::ProcessMemoryDump* pmd) override; |
77 | 78 |
78 size_t AllocatedBitmapCount() const; | 79 size_t AllocatedBitmapCount() const; |
79 | 80 |
80 void FreeSharedMemoryFromMap(const cc::SharedBitmapId& id); | 81 void FreeSharedMemoryFromMap(const cc::SharedBitmapId& id); |
81 | 82 |
82 private: | 83 private: |
83 friend class HostSharedBitmapManagerClient; | 84 friend class HostSharedBitmapManagerClient; |
84 | 85 |
85 void AllocateSharedBitmapForChild( | 86 void AllocateSharedBitmapForChild( |
86 base::ProcessHandle process_handle, | 87 base::ProcessHandle process_handle, |
(...skipping 11 matching lines...) Expand all Loading... |
98 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> > | 99 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> > |
99 BitmapMap; | 100 BitmapMap; |
100 BitmapMap handle_map_; | 101 BitmapMap handle_map_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManager); | 103 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManager); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace content | 106 } // namespace content |
106 | 107 |
107 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ | 108 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ |
OLD | NEW |