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

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

Issue 934693002: Reload favicon from HTTP cache on Ctrl+Refresh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/favicon/favicon_handler.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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Favicon download callback. 89 // Favicon download callback.
90 void DidDownloadFavicon( 90 void DidDownloadFavicon(
91 int id, 91 int id,
92 int http_status_code, 92 int http_status_code,
93 const GURL& image_url, 93 const GURL& image_url,
94 const std::vector<SkBitmap>& bitmaps, 94 const std::vector<SkBitmap>& bitmaps,
95 const std::vector<gfx::Size>& original_bitmap_sizes); 95 const std::vector<gfx::Size>& original_bitmap_sizes);
96 96
97 private: 97 private:
98 friend class content::WebContentsUserData<FaviconTabHelper>;
99 friend class FaviconTabHelperTest;
100
98 explicit FaviconTabHelper(content::WebContents* web_contents); 101 explicit FaviconTabHelper(content::WebContents* web_contents);
99 friend class content::WebContentsUserData<FaviconTabHelper>;
100 102
101 // content::WebContentsObserver overrides. 103 // content::WebContentsObserver overrides.
102 void DidStartNavigationToPendingEntry( 104 void DidStartNavigationToPendingEntry(
103 const GURL& url, 105 const GURL& url,
104 content::NavigationController::ReloadType reload_type) override; 106 content::NavigationController::ReloadType reload_type) override;
105 void DidNavigateMainFrame( 107 void DidNavigateMainFrame(
106 const content::LoadCommittedDetails& details, 108 const content::LoadCommittedDetails& details,
107 const content::FrameNavigateParams& params) override; 109 const content::FrameNavigateParams& params) override;
108 110
109 // Sets whether the page's favicon is valid (if false, the default favicon is 111 // Sets whether the page's favicon is valid (if false, the default favicon is
110 // being used). Requires GetActiveURL() to be valid. 112 // being used). Requires GetActiveURL() to be valid.
111 void SetActiveFaviconValidity(bool validity); 113 void SetActiveFaviconValidity(bool validity);
112 114
113 // Sets the URL of the favicon's bitmap. 115 // Sets the URL of the favicon's bitmap.
114 void SetActiveFaviconURL(GURL url); 116 void SetActiveFaviconURL(GURL url);
115 117
116 // Sets the bitmap of the current page's favicon. 118 // Sets the bitmap of the current page's favicon.
117 void SetActiveFaviconImage(gfx::Image image); 119 void SetActiveFaviconImage(gfx::Image image);
118 120
119 // Helper method that returns the active navigation entry's favicon. 121 // Helper method that returns the active navigation entry's favicon.
120 content::FaviconStatus& GetFaviconStatus(); 122 content::FaviconStatus& GetFaviconStatus();
121 123
122 Profile* profile_; 124 Profile* profile_;
123 125
124 FaviconClient* client_; 126 FaviconClient* client_;
125 127
126 std::vector<content::FaviconURL> favicon_urls_; 128 std::vector<content::FaviconURL> favicon_urls_;
127 129
130 // Bypass cache when downloading favicons for this page URL.
131 GURL bypass_cache_page_url_;
132
128 scoped_ptr<FaviconHandler> favicon_handler_; 133 scoped_ptr<FaviconHandler> favicon_handler_;
129 134
130 // Handles downloading touchicons. It is NULL if 135 // Handles downloading touchicons. It is NULL if
131 // browser_defaults::kEnableTouchIcon is false. 136 // browser_defaults::kEnableTouchIcon is false.
132 scoped_ptr<FaviconHandler> touch_icon_handler_; 137 scoped_ptr<FaviconHandler> touch_icon_handler_;
133 138
134 ObserverList<FaviconTabHelperObserver> observer_list_; 139 ObserverList<FaviconTabHelperObserver> observer_list_;
135 140
136 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper); 141 DISALLOW_COPY_AND_ASSIGN(FaviconTabHelper);
137 }; 142 };
138 143
139 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_ 144 #endif // CHROME_BROWSER_FAVICON_FAVICON_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_handler.cc ('k') | chrome/browser/favicon/favicon_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698