| 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 23 matching lines...) Expand all Loading... |
| 34 static RendererFrameManager* GetInstance(); | 34 static RendererFrameManager* GetInstance(); |
| 35 | 35 |
| 36 void AddFrame(RendererFrameManagerClient*, bool locked); | 36 void AddFrame(RendererFrameManagerClient*, bool locked); |
| 37 void RemoveFrame(RendererFrameManagerClient*); | 37 void RemoveFrame(RendererFrameManagerClient*); |
| 38 void LockFrame(RendererFrameManagerClient*); | 38 void LockFrame(RendererFrameManagerClient*); |
| 39 void UnlockFrame(RendererFrameManagerClient*); | 39 void UnlockFrame(RendererFrameManagerClient*); |
| 40 | 40 |
| 41 size_t GetMaxNumberOfSavedFrames() const; | 41 size_t GetMaxNumberOfSavedFrames() const; |
| 42 | 42 |
| 43 // For testing only | 43 // For testing only |
| 44 void set_max_number_of_saved_frames(size_t max_number_of_saved_frames) { |
| 45 max_number_of_saved_frames_ = max_number_of_saved_frames; |
| 46 } |
| 44 void set_max_handles(float max_handles) { max_handles_ = max_handles; } | 47 void set_max_handles(float max_handles) { max_handles_ = max_handles; } |
| 45 | 48 |
| 46 private: | 49 private: |
| 47 // Please remove when crbug.com/443824 has been fixed. | 50 // Please remove when crbug.com/443824 has been fixed. |
| 48 friend class RenderWidgetHostViewAuraTest; | 51 friend class RenderWidgetHostViewAuraTest; |
| 49 | 52 |
| 50 RendererFrameManager(); | 53 RendererFrameManager(); |
| 51 ~RendererFrameManager(); | 54 ~RendererFrameManager(); |
| 52 void CullUnlockedFrames(size_t saved_frame_limit); | 55 void CullUnlockedFrames(size_t saved_frame_limit); |
| 53 | 56 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 65 std::list<RendererFrameManagerClient*> unlocked_frames_; | 68 std::list<RendererFrameManagerClient*> unlocked_frames_; |
| 66 size_t max_number_of_saved_frames_; | 69 size_t max_number_of_saved_frames_; |
| 67 float max_handles_; | 70 float max_handles_; |
| 68 | 71 |
| 69 DISALLOW_COPY_AND_ASSIGN(RendererFrameManager); | 72 DISALLOW_COPY_AND_ASSIGN(RendererFrameManager); |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace content | 75 } // namespace content |
| 73 | 76 |
| 74 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDERER_FRAME_MANAGER_H_ |
| OLD | NEW |