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

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

Issue 258093002: Revert of Limit renderer saved frames to avoid running out of fds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/renderer_frame_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 size_t buffer_size, 58 size_t buffer_size,
59 const cc::SharedBitmapId& id, 59 const cc::SharedBitmapId& id,
60 base::SharedMemoryHandle* shared_memory_handle); 60 base::SharedMemoryHandle* shared_memory_handle);
61 void ChildAllocatedSharedBitmap(size_t buffer_size, 61 void ChildAllocatedSharedBitmap(size_t buffer_size,
62 const base::SharedMemoryHandle& handle, 62 const base::SharedMemoryHandle& handle,
63 base::ProcessHandle process_handle, 63 base::ProcessHandle process_handle,
64 const cc::SharedBitmapId& id); 64 const cc::SharedBitmapId& id);
65 void ChildDeletedSharedBitmap(const cc::SharedBitmapId& id); 65 void ChildDeletedSharedBitmap(const cc::SharedBitmapId& id);
66 void ProcessRemoved(base::ProcessHandle process_handle); 66 void ProcessRemoved(base::ProcessHandle process_handle);
67 67
68 size_t AllocatedBitmapCount() const { return handle_map_.size(); }
69
70 private: 68 private:
71 base::Lock lock_; 69 base::Lock lock_;
72 70
73 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> > 71 typedef base::hash_map<cc::SharedBitmapId, scoped_refptr<BitmapData> >
74 BitmapMap; 72 BitmapMap;
75 BitmapMap handle_map_; 73 BitmapMap handle_map_;
76 74
77 typedef base::hash_map<base::ProcessHandle, 75 typedef base::hash_map<base::ProcessHandle,
78 base::hash_set<cc::SharedBitmapId> > ProcessMap; 76 base::hash_set<cc::SharedBitmapId> > ProcessMap;
79 ProcessMap process_map_; 77 ProcessMap process_map_;
80 }; 78 };
81 79
82 } // namespace content 80 } // namespace content
83 81
84 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_ 82 #endif // CONTENT_COMMON_HOST_SHARED_BITMAP_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/renderer_frame_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698