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.
5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "content/public/common/favicon_url.h"
18 class FaviconRawBitmapHandler
;
25 // LauncherFaviconLoader handles updates to the list of favicon urls and
26 // retrieves the appropriately sized favicon for panels in the Launcher.
28 class LauncherFaviconLoader
{
32 virtual void FaviconUpdated() = 0;
35 virtual ~Delegate() {}
38 LauncherFaviconLoader(Delegate
* delegate
,
39 content::WebContents
* web_contents
);
40 virtual ~LauncherFaviconLoader();
42 content::WebContents
* web_contents() {
46 // Returns an appropriately sized favicon for the Launcher. If none are
47 // available will return an isNull bitmap.
48 SkBitmap
GetFavicon() const;
50 // Returns true if the loader is waiting for downloads to finish.
51 bool HasPendingDownloads() const;
54 content::WebContents
* web_contents_
;
55 scoped_ptr
<internal::FaviconRawBitmapHandler
> favicon_handler_
;
57 DISALLOW_COPY_AND_ASSIGN(LauncherFaviconLoader
);
60 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_