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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 friend class RenderWidgetHostViewAuraTest; | 51 friend class RenderWidgetHostViewAuraTest; |
52 | 52 |
53 RendererFrameManager(); | 53 RendererFrameManager(); |
54 ~RendererFrameManager(); | 54 ~RendererFrameManager(); |
55 void CullUnlockedFrames(size_t saved_frame_limit); | 55 void CullUnlockedFrames(size_t saved_frame_limit); |
56 | 56 |
57 // React on memory pressure events to adjust the number of cached frames. | 57 // React on memory pressure events to adjust the number of cached frames. |
58 void OnMemoryPressure( | 58 void OnMemoryPressure( |
59 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); | 59 base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level); |
60 | 60 |
61 friend struct DefaultSingletonTraits<RendererFrameManager>; | 61 friend struct base::DefaultSingletonTraits<RendererFrameManager>; |
62 | 62 |
63 // Listens for system under pressure notifications and adjusts number of | 63 // Listens for system under pressure notifications and adjusts number of |
64 // cached frames accordingly. | 64 // cached frames accordingly. |
65 base::MemoryPressureListener memory_pressure_listener_; | 65 base::MemoryPressureListener memory_pressure_listener_; |
66 | 66 |
67 std::map<RendererFrameManagerClient*, size_t> locked_frames_; | 67 std::map<RendererFrameManagerClient*, size_t> locked_frames_; |
68 std::list<RendererFrameManagerClient*> unlocked_frames_; | 68 std::list<RendererFrameManagerClient*> unlocked_frames_; |
69 size_t max_number_of_saved_frames_; | 69 size_t max_number_of_saved_frames_; |
70 float max_handles_; | 70 float max_handles_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(RendererFrameManager); | 72 DISALLOW_COPY_AND_ASSIGN(RendererFrameManager); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace content | 75 } // namespace content |
76 | 76 |
77 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ |
OLD | NEW |