| 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 25 matching lines...) Expand all Loading... |
| 36 ~HostSharedBitmapManager() override; | 36 ~HostSharedBitmapManager() override; |
| 37 | 37 |
| 38 static HostSharedBitmapManager* current(); | 38 static HostSharedBitmapManager* current(); |
| 39 | 39 |
| 40 // cc::SharedBitmapManager implementation. | 40 // cc::SharedBitmapManager implementation. |
| 41 scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap( | 41 scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap( |
| 42 const gfx::Size& size) override; | 42 const gfx::Size& size) override; |
| 43 scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId( | 43 scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId( |
| 44 const gfx::Size& size, | 44 const gfx::Size& size, |
| 45 const cc::SharedBitmapId&) override; | 45 const cc::SharedBitmapId&) override; |
| 46 scoped_ptr<cc::SharedBitmap> GetBitmapForSharedMemory( | |
| 47 base::SharedMemory*) override; | |
| 48 | 46 |
| 49 void AllocateSharedBitmapForChild( | 47 void AllocateSharedBitmapForChild( |
| 50 base::ProcessHandle process_handle, | 48 base::ProcessHandle process_handle, |
| 51 size_t buffer_size, | 49 size_t buffer_size, |
| 52 const cc::SharedBitmapId& id, | 50 const cc::SharedBitmapId& id, |
| 53 base::SharedMemoryHandle* shared_memory_handle); | 51 base::SharedMemoryHandle* shared_memory_handle); |
| 54 void ChildAllocatedSharedBitmap(size_t buffer_size, | 52 void ChildAllocatedSharedBitmap(size_t buffer_size, |
| 55 const base::SharedMemoryHandle& handle, | 53 const base::SharedMemoryHandle& handle, |
| 56 base::ProcessHandle process_handle, | 54 base::ProcessHandle process_handle, |
| 57 const cc::SharedBitmapId& id); | 55 const cc::SharedBitmapId& id); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 70 BitmapMap handle_map_; | 68 BitmapMap handle_map_; |
| 71 | 69 |
| 72 typedef base::hash_map<base::ProcessHandle, | 70 typedef base::hash_map<base::ProcessHandle, |
| 73 base::hash_set<cc::SharedBitmapId> > ProcessMap; | 71 base::hash_set<cc::SharedBitmapId> > ProcessMap; |
| 74 ProcessMap process_map_; | 72 ProcessMap process_map_; |
| 75 }; | 73 }; |
| 76 | 74 |
| 77 } // namespace content | 75 } // namespace content |
| 78 | 76 |
| 79 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ | 77 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ |
| OLD | NEW |