OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const gfx::Rect& bitmap_rect, | 51 const gfx::Rect& bitmap_rect, |
52 bool* needs_full_paint); | 52 bool* needs_full_paint); |
53 | 53 |
54 // Returns a matching backing store for the host. | 54 // Returns a matching backing store for the host. |
55 // Returns NULL if we fail to find one. | 55 // Returns NULL if we fail to find one. |
56 static BackingStore* Lookup(RenderWidgetHost* host); | 56 static BackingStore* Lookup(RenderWidgetHost* host); |
57 | 57 |
58 // Removes the backing store for the host. | 58 // Removes the backing store for the host. |
59 static void RemoveBackingStore(RenderWidgetHost* host); | 59 static void RemoveBackingStore(RenderWidgetHost* host); |
60 | 60 |
| 61 // Expires the given backing store. This emulates something getting evicted |
| 62 // from the cache for the purpose of testing. Returns true if the host was |
| 63 // removed, false if it wasn't found. |
| 64 static bool ExpireBackingStoreForTest(RenderWidgetHost* host); |
| 65 |
61 private: | 66 private: |
62 // Not intended for instantiation. | 67 // Not intended for instantiation. |
63 BackingStoreManager() {} | 68 BackingStoreManager() {} |
64 | 69 |
65 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); | 70 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); |
66 }; | 71 }; |
67 | 72 |
68 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 73 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
OLD | NEW |