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

Side by Side Diff: chrome/browser/ui/intents/web_intent_icon_loader.h

Issue 11137024: Factoring out of FaviconLoader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_INTENTS_WEB_INTENT_ICON_LOADER_H_
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_ICON_LOADER_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/common/cancelable_request.h"
10 #include "chrome/browser/favicon/favicon_service.h"
11
12 class Profile;
13 class WebIntentPickerModel;
14
15 namespace web_intents {
16
17 class IconLoader {
James Hawkins 2012/10/17 03:38:39 Document class.
18 public:
19 IconLoader(Profile* profile, WebIntentPickerModel* model);
James Hawkins 2012/10/17 03:38:39 Document params.
20 ~IconLoader();
21
22 // Load the favicon associated with |url|.
James Hawkins 2012/10/17 03:38:39 Loads
23 void LoadFavicon(const GURL& url);
24
25 private:
26 // Called when a favicon is returned from the FaviconService.
27 void OnFaviconDataAvailable(
James Hawkins 2012/10/17 03:38:39 Document what it does.
28 const GURL& url,
29 FaviconService::Handle handle,
30 const history::FaviconImageResult& image_result);
31
32 // A weak pointer to the profile for the web contents.
33 Profile* profile_;
34
35 // A weak pointer to the model being updated.
36 WebIntentPickerModel* model_;
37
38 // Request consumer used when asynchronously loading favicons.
39 CancelableRequestConsumer favicon_consumer_;
40
41 // Factory for weak pointers used in callbacks for async calls to load icon.
42 base::WeakPtrFactory<IconLoader> weak_ptr_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(IconLoader);
45 };
46
47 } // namespace web_intents;
48
49 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_ICON_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698