Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: components/favicon_base/favicon_callback.h

Issue 2784233003: [LargeIconService] Allow decoding of images in the service (Closed)
Patch Set: Minor changes #2 Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 struct LargeIconResult;
17 struct LargeIconImageResult;
17 18
18 // Callback for functions that can be used to return a |gfx::Image| and the 19 // Callback for functions that can be used to return a |gfx::Image| and the
19 // |GURL| it is loaded from. They are returned as a |FaviconImageResult| object. 20 // |GURL| it is loaded from. They are returned as a |FaviconImageResult| object.
20 typedef base::Callback<void(const FaviconImageResult&)> FaviconImageCallback; 21 typedef base::Callback<void(const FaviconImageResult&)> FaviconImageCallback;
21 22
22 // Callback for functions returning raw data for a favicon. In 23 // Callback for functions returning raw data for a favicon. In
23 // |FaviconRawBitmapResult|, the data is not yet converted as a |gfx::Image|. 24 // |FaviconRawBitmapResult|, the data is not yet converted as a |gfx::Image|.
24 typedef base::Callback<void(const FaviconRawBitmapResult&)> 25 typedef base::Callback<void(const FaviconRawBitmapResult&)>
25 FaviconRawBitmapCallback; 26 FaviconRawBitmapCallback;
26 27
27 // Callback for functions returning raw data for a favicon in multiple 28 // Callback for functions returning raw data for a favicon in multiple
28 // resolution. In |FaviconRawBitmapResult|, the data is not yet converted as a 29 // resolution. In |FaviconRawBitmapResult|, the data is not yet converted as a
29 // |gfx::Image|. 30 // |gfx::Image|.
30 typedef base::Callback<void(const std::vector<FaviconRawBitmapResult>&)> 31 typedef base::Callback<void(const std::vector<FaviconRawBitmapResult>&)>
31 FaviconResultsCallback; 32 FaviconResultsCallback;
32 33
33 // Callback for functions returning data for a large icon. |LargeIconResult| 34 // 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 // 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 // fallback to use if a sufficiently large icon could not be found.
37 // TODO(jkrcal): Rename LargeIcon* to LargeIconRawBitmap*.
36 typedef base::Callback<void(const LargeIconResult&)> LargeIconCallback; 38 typedef base::Callback<void(const LargeIconResult&)> LargeIconCallback;
37 39
40 // Callback for functions returning decoded data for a large icon.
41 // |LargeIconImageResult| will contain either the decoded image of a large
42 // icon or the style of the fallback to use if a sufficiently large icon could
43 // not be found.
44 typedef base::Callback<void(const LargeIconImageResult&)>
45 LargeIconImageCallback;
46
38 } // namespace favicon_base 47 } // namespace favicon_base
39 48
40 #endif // COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_ 49 #endif // COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698