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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_favicon_loader.h

Issue 2890983003: Remove AshPanelContents (Closed)
Patch Set: fix errors Created 3 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_
7
8 #include <memory>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "base/macros.h"
13 #include "content/public/common/favicon_url.h"
14
15 class SkBitmap;
16
17 namespace internal {
18 class FaviconRawBitmapHandler;
19 }
20
21 namespace content {
22 class WebContents;
23 }
24
25 // LauncherFaviconLoader handles updates to the list of favicon urls and
26 // retrieves the appropriately sized favicon for panels in the Launcher.
27
28 class LauncherFaviconLoader {
29 public:
30 class Delegate {
31 public:
32 virtual void FaviconUpdated() = 0;
33
34 protected:
35 virtual ~Delegate() {}
36 };
37
38 LauncherFaviconLoader(Delegate* delegate,
39 content::WebContents* web_contents);
40 virtual ~LauncherFaviconLoader();
41
42 content::WebContents* web_contents() {
43 return web_contents_;
44 }
45
46 // Returns an appropriately sized favicon for the Launcher. If none are
47 // available will return an isNull bitmap.
48 SkBitmap GetFavicon() const;
49
50 // Returns true if the loader is waiting for downloads to finish.
51 bool HasPendingDownloads() const;
52
53 private:
54 content::WebContents* web_contents_;
55 std::unique_ptr<internal::FaviconRawBitmapHandler> favicon_handler_;
56
57 DISALLOW_COPY_AND_ASSIGN(LauncherFaviconLoader);
58 };
59
60 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_FAVICON_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698