| 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 #include "chrome/browser/icon_manager.h" | 5 #include "chrome/browser/icon_manager.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
| 12 | 12 |
| 13 IconManager::IconManager() { | 13 IconManager::IconManager() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 IconManager::~IconManager() { | 16 IconManager::~IconManager() { |
| 17 STLDeleteValues(&icon_cache_); | 17 STLDeleteValues(&icon_cache_); |
| 18 } | 18 } |
| 19 | 19 |
| 20 SkBitmap* IconManager::LookupIcon(const FilePath& file_name, | 20 SkBitmap* IconManager::LookupIcon(const FilePath& file_name, |
| 21 IconLoader::IconSize size) { | 21 IconLoader::IconSize size) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 IconLoader::IconSize size) | 88 IconLoader::IconSize size) |
| 89 : group(group), | 89 : group(group), |
| 90 size(size) { | 90 size(size) { |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool IconManager::CacheKey::operator<(const CacheKey &other) const { | 93 bool IconManager::CacheKey::operator<(const CacheKey &other) const { |
| 94 if (group != other.group) | 94 if (group != other.group) |
| 95 return group < other.group; | 95 return group < other.group; |
| 96 return size < other.size; | 96 return size < other.size; |
| 97 } | 97 } |
| OLD | NEW |