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

Side by Side Diff: chrome/browser/favicon/favicon_tab_helper.h

Issue 64853004: Use high resolution icons where possible for streamlined hosted app icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_experiment_create_app_from_page
Patch Set: move favicon_downloader* to c/b/extensions Created 7 years 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/extensions/tab_helper.cc ('k') | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
6 #define CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 6 #define CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // entries, which should rarely happen. 44 // entries, which should rarely happen.
45 gfx::Image GetFavicon() const; 45 gfx::Image GetFavicon() const;
46 46
47 // Returns true if we have the favicon for the page. 47 // Returns true if we have the favicon for the page.
48 bool FaviconIsValid() const; 48 bool FaviconIsValid() const;
49 49
50 // Returns whether the favicon should be displayed. If this returns false, no 50 // Returns whether the favicon should be displayed. If this returns false, no
51 // space is provided for the favicon, and the favicon is never displayed. 51 // space is provided for the favicon, and the favicon is never displayed.
52 virtual bool ShouldDisplayFavicon(); 52 virtual bool ShouldDisplayFavicon();
53 53
54 // Returns the current tab's favicon urls. Returns NULL if the current tab's
55 // favicon urls have not been populated yet.
56 const std::vector<content::FaviconURL>& GetFaviconURLs() {
sky 2013/12/11 15:12:06 GetFaviconURLS()-> favicon_urls() and make const.
calamity 2013/12/12 05:35:00 Done.
57 return favicon_urls_;
58 }
59
54 // Allows the client to determine if they want to fetch the Favicons as 60 // Allows the client to determine if they want to fetch the Favicons as
55 // they are discovered. 61 // they are discovered.
56 void set_should_fetch_icons(bool fetch) { 62 void set_should_fetch_icons(bool fetch) {
57 should_fetch_icons_ = fetch; 63 should_fetch_icons_ = fetch;
58 } 64 }
59 65
60 // content::WebContentsObserver override. Must be public, because also 66 // content::WebContentsObserver override. Must be public, because also
61 // called from PrerenderContents. 67 // called from PrerenderContents.
62 virtual void DidUpdateFaviconURL( 68 virtual void DidUpdateFaviconURL(
63 int32 page_id, 69 int32 page_id,
(...skipping 23 matching lines...) Expand all
87 virtual void NavigateToPendingEntry( 93 virtual void NavigateToPendingEntry(
88 const GURL& url, 94 const GURL& url,
89 content::NavigationController::ReloadType reload_type) OVERRIDE; 95 content::NavigationController::ReloadType reload_type) OVERRIDE;
90 virtual void DidNavigateMainFrame( 96 virtual void DidNavigateMainFrame(
91 const content::LoadCommittedDetails& details, 97 const content::LoadCommittedDetails& details,
92 const content::FrameNavigateParams& params) OVERRIDE; 98 const content::FrameNavigateParams& params) OVERRIDE;
93 99
94 Profile* profile_; 100 Profile* profile_;
95 bool should_fetch_icons_; 101 bool should_fetch_icons_;
96 102
103 std::vector<content::FaviconURL> favicon_urls_;
104
97 scoped_ptr<FaviconHandler> favicon_handler_; 105 scoped_ptr<FaviconHandler> favicon_handler_;
98 106
99 // Handles downloading touchicons. It is NULL if 107 // Handles downloading touchicons. It is NULL if
100 // browser_defaults::kEnableTouchIcon is false. 108 // browser_defaults::kEnableTouchIcon is false.
101 scoped_ptr<FaviconHandler> touch_icon_handler_; 109 scoped_ptr<FaviconHandler> touch_icon_handler_;
102 110
103 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); 111 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper);
104 }; 112 };
105 113
106 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 114 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698