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

Side by Side Diff: content/common/host_shared_bitmap_manager.h

Issue 1464383004: Add lock around modification of HostSharedBitmapManagerClient::owned_bitmaps_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const cc::SharedBitmapId& id, 44 const cc::SharedBitmapId& id,
45 base::SharedMemoryHandle* shared_memory_handle); 45 base::SharedMemoryHandle* shared_memory_handle);
46 void ChildAllocatedSharedBitmap(size_t buffer_size, 46 void ChildAllocatedSharedBitmap(size_t buffer_size,
47 const base::SharedMemoryHandle& handle, 47 const base::SharedMemoryHandle& handle,
48 base::ProcessHandle process_handle, 48 base::ProcessHandle process_handle,
49 const cc::SharedBitmapId& id); 49 const cc::SharedBitmapId& id);
50 void ChildDeletedSharedBitmap(const cc::SharedBitmapId& id); 50 void ChildDeletedSharedBitmap(const cc::SharedBitmapId& id);
51 51
52 private: 52 private:
53 HostSharedBitmapManager* manager_; 53 HostSharedBitmapManager* manager_;
54 base::Lock lock_;
54 base::hash_set<cc::SharedBitmapId> owned_bitmaps_; 55 base::hash_set<cc::SharedBitmapId> owned_bitmaps_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManagerClient); 57 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManagerClient);
57 }; 58 };
58 59
59 class CONTENT_EXPORT HostSharedBitmapManager 60 class CONTENT_EXPORT HostSharedBitmapManager
60 : public cc::SharedBitmapManager, 61 : public cc::SharedBitmapManager,
61 public base::trace_event::MemoryDumpProvider { 62 public base::trace_event::MemoryDumpProvider {
62 public: 63 public:
63 HostSharedBitmapManager(); 64 HostSharedBitmapManager();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> > 100 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> >
100 BitmapMap; 101 BitmapMap;
101 BitmapMap handle_map_; 102 BitmapMap handle_map_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManager); 104 DISALLOW_COPY_AND_ASSIGN(HostSharedBitmapManager);
104 }; 105 };
105 106
106 } // namespace content 107 } // namespace content
107 108
108 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ 109 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/host_shared_bitmap_manager.cc » ('j') | content/common/host_shared_bitmap_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698