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

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

Issue 291643002: Move favicon callbacks to favicon_base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android unittest Created 6 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_
6 #define COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11
12 namespace favicon_base {
13
14 struct FaviconBitmapResult;
15 struct FaviconImageResult;
16
17 // Callback for FaviconService::GetFaviconImage(),
blundell 2014/05/19 07:50:30 Hmm, these comments are not the right ones now tha
sdefresne 2014/05/19 14:36:39 I'd got with something like: // Callback for func
blundell 2014/05/19 15:12:59 s/for functions returning/that can be used to retu
Jiang Jiang 2014/05/19 15:56:41 Done.
18 // FaviconService::GetFaviconImageForURL() and
19 // BookmarkClient::GetFaviconImageForURL().
20 // |FaviconImageResult::image| is constructed from the bitmaps for the
21 // passed in URL and icon types which most which closely match the passed in
22 // |desired_size_in_dip| at the scale factors supported by the current
23 // platform (eg MacOS) in addition to 1x.
24 // |FaviconImageResult::icon_url| is the favicon that the favicon bitmaps in
25 // |image| originate from.
26 // TODO(pkotwicz): Enable constructing |image| from bitmaps from several
27 // icon URLs.
28 typedef base::Callback<void(const FaviconImageResult&)> FaviconImageCallback;
29
30 // Callback for GetRawFavicon(), GetRawFaviconForURL() and
sdefresne 2014/05/19 14:36:39 // Callback for functions returning raw data for a
blundell 2014/05/19 15:12:59 Sylvain, what is raw data? is there any way to be
sdefresne 2014/05/19 16:30:04 FaviconBitmapResult does not store the favicon as
31 // GetLargestRawFavicon().
32 // See function for details on value.
33 typedef base::Callback<void(const FaviconBitmapResult&)> FaviconRawCallback;
34
35 // Callback for GetFavicon() and GetFaviconForURL().
sdefresne 2014/05/19 14:36:39 // Callback for functions returning raw data for a
blundell 2014/05/19 15:12:59 same question as above for Sylvain On 2014/05/19
36 //
37 // The first argument is the set of bitmaps for the passed in URL and
38 // icon types whose pixel sizes best match the passed in
39 // |desired_size_in_dip| at the scale factors supported by the current
40 // platform (eg MacOS) in addition to 1x. The vector has at most one result
41 // for each of the scale factors. There are less entries if a single result
42 // is the best bitmap to use for several scale factors.
43 typedef base::Callback<void(const std::vector<FaviconBitmapResult>&)>
44 FaviconResultsCallback;
45
46 } // namespace favicon_base
47
48 #endif // COMPONENTS_FAVICON_BASE_FAVICON_CALLBACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698