OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/image_decoder.h" | 13 #include "chrome/browser/image_decoder.h" |
13 #include "net/url_request/url_fetcher_delegate.h" | 14 #include "net/url_request/url_fetcher_delegate.h" |
14 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
15 #include "ui/gfx/image/image_skia_source.h" | 16 #include "ui/gfx/image/image_skia_source.h" |
16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 class URLFetcher; | 20 class URLFetcher; |
20 class URLRequestContextGetter; | 21 class URLRequestContextGetter; |
21 } | 22 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void OnImageDecoded(const SkBitmap& decoded_image) override; | 55 void OnImageDecoded(const SkBitmap& decoded_image) override; |
55 void OnDecodeImageFailed() override; | 56 void OnDecodeImageFailed() override; |
56 | 57 |
57 IconLoadedCallback icon_loaded_callback_; | 58 IconLoadedCallback icon_loaded_callback_; |
58 net::URLRequestContextGetter* context_getter_; | 59 net::URLRequestContextGetter* context_getter_; |
59 const GURL icon_url_; | 60 const GURL icon_url_; |
60 const int icon_size_; | 61 const int icon_size_; |
61 const int default_icon_resource_id_; | 62 const int default_icon_resource_id_; |
62 | 63 |
63 bool icon_fetch_attempted_; | 64 bool icon_fetch_attempted_; |
64 scoped_ptr<net::URLFetcher> icon_fetcher_; | 65 std::unique_ptr<net::URLFetcher> icon_fetcher_; |
65 | 66 |
66 gfx::ImageSkia icon_; | 67 gfx::ImageSkia icon_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(UrlIconSource); | 69 DISALLOW_COPY_AND_ASSIGN(UrlIconSource); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace app_list | 72 } // namespace app_list |
72 | 73 |
73 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ | 74 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_COMMON_URL_ICON_SOURCE_H_ |
OLD | NEW |