OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ | 5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ |
6 #define COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ | 6 #define COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 | 11 |
12 namespace favicon_base { | 12 namespace favicon_base { |
13 | 13 |
14 struct FaviconRawBitmapResult; | 14 struct FaviconRawBitmapResult; |
15 struct FaviconImageResult; | 15 struct FaviconImageResult; |
| 16 struct LargeIconResult; |
16 | 17 |
17 // Callback for functions that can be used to return a |gfx::Image| and the | 18 // Callback for functions that can be used to return a |gfx::Image| and the |
18 // |GURL| it is loaded from. They are returned as a |FaviconImageResult| object. | 19 // |GURL| it is loaded from. They are returned as a |FaviconImageResult| object. |
19 typedef base::Callback<void(const FaviconImageResult&)> FaviconImageCallback; | 20 typedef base::Callback<void(const FaviconImageResult&)> FaviconImageCallback; |
20 | 21 |
21 // Callback for functions returning raw data for a favicon. In | 22 // Callback for functions returning raw data for a favicon. In |
22 // |FaviconRawBitmapResult|, the data is not yet converted as a |gfx::Image|. | 23 // |FaviconRawBitmapResult|, the data is not yet converted as a |gfx::Image|. |
23 typedef base::Callback<void(const FaviconRawBitmapResult&)> | 24 typedef base::Callback<void(const FaviconRawBitmapResult&)> |
24 FaviconRawBitmapCallback; | 25 FaviconRawBitmapCallback; |
25 | 26 |
26 // Callback for functions returning raw data for a favicon in multiple | 27 // Callback for functions returning raw data for a favicon in multiple |
27 // resolution. In |FaviconRawBitmapResult|, the data is not yet converted as a | 28 // resolution. In |FaviconRawBitmapResult|, the data is not yet converted as a |
28 // |gfx::Image|. | 29 // |gfx::Image|. |
29 typedef base::Callback<void(const std::vector<FaviconRawBitmapResult>&)> | 30 typedef base::Callback<void(const std::vector<FaviconRawBitmapResult>&)> |
30 FaviconResultsCallback; | 31 FaviconResultsCallback; |
31 | 32 |
| 33 // Callback for functions returning data for a large icon. |LargeIconResult| |
| 34 // will contain either the raw bitmap for a large icon or the style of the |
| 35 // fallback to use if a sufficiently large icon could not be found. |
| 36 typedef base::Callback<void(const LargeIconResult&)> LargeIconCallback; |
| 37 |
32 } // namespace favicon_base | 38 } // namespace favicon_base |
33 | 39 |
34 #endif // COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ | 40 #endif // COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ |
OLD | NEW |