| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Class for finding and caching Windows explorer icons. The IconManager | 5 // Class for finding and caching Windows explorer icons. The IconManager |
| 6 // lives on the UI thread but performs icon extraction work on the file thread | 6 // lives on the UI thread but performs icon extraction work on the file thread |
| 7 // to avoid blocking the UI thread with potentially expensive COM and disk | 7 // to avoid blocking the UI thread with potentially expensive COM and disk |
| 8 // operations. | 8 // operations. |
| 9 // | 9 // |
| 10 // Terminology | 10 // Terminology |
| 11 // | 11 // |
| (...skipping 28 matching lines...) Expand all Loading... |
| 40 // fast. | 40 // fast. |
| 41 // | 41 // |
| 42 // Icon bitmaps returned should be treated as const since they may be referenced | 42 // Icon bitmaps returned should be treated as const since they may be referenced |
| 43 // by other clients. Make a copy of the icon if you need to modify it. | 43 // by other clients. Make a copy of the icon if you need to modify it. |
| 44 | 44 |
| 45 #ifndef CHROME_BROWSER_ICON_MANAGER_H_ | 45 #ifndef CHROME_BROWSER_ICON_MANAGER_H_ |
| 46 #define CHROME_BROWSER_ICON_MANAGER_H_ | 46 #define CHROME_BROWSER_ICON_MANAGER_H_ |
| 47 #pragma once | 47 #pragma once |
| 48 | 48 |
| 49 #include <map> | 49 #include <map> |
| 50 #include <string> | |
| 51 | 50 |
| 52 #include "base/callback.h" | 51 #include "base/callback.h" |
| 53 #include "base/hash_tables.h" | 52 #include "base/hash_tables.h" |
| 54 #include "chrome/browser/cancelable_request.h" | 53 #include "chrome/browser/cancelable_request.h" |
| 55 #include "chrome/browser/icon_loader.h" | 54 #include "chrome/browser/icon_loader.h" |
| 56 | 55 |
| 57 class FilePath; | 56 class FilePath; |
| 58 class SkBitmap; | 57 class SkBitmap; |
| 59 | 58 |
| 60 class IconManager : public IconLoader::Delegate, | 59 class IconManager : public IconLoader::Delegate, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } ClientRequest; | 113 } ClientRequest; |
| 115 | 114 |
| 116 // Asynchronous requests that have not yet been completed. | 115 // Asynchronous requests that have not yet been completed. |
| 117 typedef std::map<IconLoader*, ClientRequest> ClientRequests; | 116 typedef std::map<IconLoader*, ClientRequest> ClientRequests; |
| 118 ClientRequests requests_; | 117 ClientRequests requests_; |
| 119 | 118 |
| 120 DISALLOW_COPY_AND_ASSIGN(IconManager); | 119 DISALLOW_COPY_AND_ASSIGN(IconManager); |
| 121 }; | 120 }; |
| 122 | 121 |
| 123 #endif // CHROME_BROWSER_ICON_MANAGER_H_ | 122 #endif // CHROME_BROWSER_ICON_MANAGER_H_ |
| OLD | NEW |