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_loader.h" | 5 #include "chrome/browser/icon_loader.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
| 10 #include "app/gfx/icon_util.h" |
10 #include "base/file_util.h" | 11 #include "base/file_util.h" |
11 #include "base/gfx/size.h" | 12 #include "base/gfx/size.h" |
12 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
13 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
14 #include "base/string_util.h" | 15 #include "base/string_util.h" |
15 #include "base/task.h" | 16 #include "base/task.h" |
16 #include "base/thread.h" | 17 #include "base/thread.h" |
17 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
18 #include "chrome/common/gfx/icon_util.h" | |
19 | 19 |
20 #include "SkBitmap.h" | 20 #include "SkBitmap.h" |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 class IconLoaderProcessor : | 24 class IconLoaderProcessor : |
25 public base::RefCountedThreadSafe<IconLoaderProcessor> { | 25 public base::RefCountedThreadSafe<IconLoaderProcessor> { |
26 public: | 26 public: |
27 explicit IconLoaderProcessor(IconLoader* target) | 27 explicit IconLoaderProcessor(IconLoader* target) |
28 : target_(target), | 28 : target_(target), |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 delegate_ = NULL; | 234 delegate_ = NULL; |
235 } | 235 } |
236 | 236 |
237 bool IconLoader::OnLoadComplete(SkBitmap* bitmap) { | 237 bool IconLoader::OnLoadComplete(SkBitmap* bitmap) { |
238 if (delegate_) { | 238 if (delegate_) { |
239 return delegate_->OnSkBitmapLoaded(this, bitmap); | 239 return delegate_->OnSkBitmapLoaded(this, bitmap); |
240 // We are likely deleted after this point. | 240 // We are likely deleted after this point. |
241 } | 241 } |
242 return false; | 242 return false; |
243 } | 243 } |
OLD | NEW |