| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 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 | 62 // from the cache for the purpose of testing. Returns true if the host was |
| 63 // removed, false if it wasn't found. | 63 // removed, false if it wasn't found. |
| 64 static bool ExpireBackingStoreForTest(RenderWidgetHost* host); | 64 static bool ExpireBackingStoreForTest(RenderWidgetHost* host); |
| 65 | 65 |
| 66 // Current size in bytes of the backing store cache. |
| 67 static size_t MemorySize(); |
| 68 |
| 66 private: | 69 private: |
| 67 // Not intended for instantiation. | 70 // Not intended for instantiation. |
| 68 BackingStoreManager() {} | 71 BackingStoreManager() {} |
| 69 | 72 |
| 70 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); | 73 DISALLOW_COPY_AND_ASSIGN(BackingStoreManager); |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ | 76 #endif // CHROME_BROWSER_RENDERER_HOST_BACKING_STORE_MANAGER_H_ |
| OLD | NEW |