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