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

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

Issue 14322023: Don't request missing favicon on every page request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync up to r199996 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/favicon/favicon_service.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const std::vector<content::FaviconURL>& candidates) OVERRIDE; 65 const std::vector<content::FaviconURL>& candidates) OVERRIDE;
66 66
67 // Saves the favicon for the current page. 67 // Saves the favicon for the current page.
68 void SaveFavicon(); 68 void SaveFavicon();
69 69
70 // FaviconHandlerDelegate methods. 70 // FaviconHandlerDelegate methods.
71 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE; 71 virtual content::NavigationEntry* GetActiveEntry() OVERRIDE;
72 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE; 72 virtual int StartDownload(const GURL& url, int image_size) OVERRIDE;
73 virtual void NotifyFaviconUpdated(bool icon_url_changed) OVERRIDE; 73 virtual void NotifyFaviconUpdated(bool icon_url_changed) OVERRIDE;
74 74
75 // Favicon download callback.
76 void DidDownloadFavicon(
77 int id,
78 int http_status_code,
79 const GURL& image_url,
80 int requested_size,
81 const std::vector<SkBitmap>& bitmaps);
82
75 private: 83 private:
76 explicit FaviconTabHelper(content::WebContents* web_contents); 84 explicit FaviconTabHelper(content::WebContents* web_contents);
77 friend class content::WebContentsUserData<FaviconTabHelper>; 85 friend class content::WebContentsUserData<FaviconTabHelper>;
78 86
79 // content::WebContentsObserver overrides. 87 // content::WebContentsObserver overrides.
80 virtual void NavigateToPendingEntry( 88 virtual void NavigateToPendingEntry(
81 const GURL& url, 89 const GURL& url,
82 content::NavigationController::ReloadType reload_type) OVERRIDE; 90 content::NavigationController::ReloadType reload_type) OVERRIDE;
83 virtual void DidNavigateMainFrame( 91 virtual void DidNavigateMainFrame(
84 const content::LoadCommittedDetails& details, 92 const content::LoadCommittedDetails& details,
85 const content::FrameNavigateParams& params) OVERRIDE; 93 const content::FrameNavigateParams& params) OVERRIDE;
86 94
87 // Favicon download callback.
88 void DidDownloadFavicon(
89 int id,
90 const GURL& image_url,
91 int requested_size,
92 const std::vector<SkBitmap>& bitmaps);
93
94 Profile* profile_; 95 Profile* profile_;
95 bool should_fetch_icons_; 96 bool should_fetch_icons_;
96 97
97 scoped_ptr<FaviconHandler> favicon_handler_; 98 scoped_ptr<FaviconHandler> favicon_handler_;
98 99
99 // Handles downloading touchicons. It is NULL if 100 // Handles downloading touchicons. It is NULL if
100 // browser_defaults::kEnableTouchIcon is false. 101 // browser_defaults::kEnableTouchIcon is false.
101 scoped_ptr<FaviconHandler> touch_icon_handler_; 102 scoped_ptr<FaviconHandler> touch_icon_handler_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); 104 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper);
104 }; 105 };
105 106
106 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 107 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_service.cc ('k') | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698