OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "content/common/host_shared_bitmap_manager.h" | 5 #include "content/common/host_shared_bitmap_manager.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
10 #include "ui/gfx/size.h" | 10 #include "ui/gfx/geometry/size.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class BitmapData : public base::RefCountedThreadSafe<BitmapData> { | 14 class BitmapData : public base::RefCountedThreadSafe<BitmapData> { |
15 public: | 15 public: |
16 BitmapData(base::ProcessHandle process_handle, | 16 BitmapData(base::ProcessHandle process_handle, |
17 size_t buffer_size) | 17 size_t buffer_size) |
18 : process_handle(process_handle), | 18 : process_handle(process_handle), |
19 buffer_size(buffer_size) {} | 19 buffer_size(buffer_size) {} |
20 base::ProcessHandle process_handle; | 20 base::ProcessHandle process_handle; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return handle_map_.size(); | 199 return handle_map_.size(); |
200 } | 200 } |
201 | 201 |
202 void HostSharedBitmapManager::FreeSharedMemoryFromMap( | 202 void HostSharedBitmapManager::FreeSharedMemoryFromMap( |
203 const cc::SharedBitmapId& id) { | 203 const cc::SharedBitmapId& id) { |
204 base::AutoLock lock(lock_); | 204 base::AutoLock lock(lock_); |
205 handle_map_.erase(id); | 205 handle_map_.erase(id); |
206 } | 206 } |
207 | 207 |
208 } // namespace content | 208 } // namespace content |
OLD | NEW |