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

Unified Diff: chrome/browser/ui/webui/favicon_source.h

Issue 11747016: Add support for high DPI favicons on the "other devices" menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ordering in header file. Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/shared/js/util.js ('k') | chrome/browser/ui/webui/favicon_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/favicon_source.h
diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/favicon_source.h
index 2ccc6d3e89bf6d64d5670e8814201a6ec200d689..9df3cd7bde168260eebe5df84f05210dc0b0c6d3 100644
--- a/chrome/browser/ui/webui/favicon_source.h
+++ b/chrome/browser/ui/webui/favicon_source.h
@@ -48,35 +48,47 @@ class FaviconSource : public ChromeURLDataManager::DataSource {
virtual bool ShouldReplaceExistingSource() const OVERRIDE;
protected:
- virtual ~FaviconSource();
-
- Profile* profile_;
-
- private:
- // Defines the allowed pixel sizes for requested favicons.
- enum IconSize {
- SIZE_16,
- SIZE_32,
- SIZE_64,
- NUM_SIZES
- };
-
struct IconRequest {
IconRequest()
: request_id(0),
+ request_path(""),
size_in_dip(gfx::kFaviconSize),
scale_factor(ui::SCALE_FACTOR_NONE) {
}
- IconRequest(int id, int size, ui::ScaleFactor scale)
+ IconRequest(int id,
+ const std::string& path,
+ int size,
+ ui::ScaleFactor scale)
: request_id(id),
+ request_path(path),
size_in_dip(size),
scale_factor(scale) {
}
int request_id;
+ std::string request_path;
int size_in_dip;
ui::ScaleFactor scale_factor;
};
+ virtual ~FaviconSource();
+
+ // Called when the favicon data is missing to perform additional checks to
+ // locate the resource.
+ // |request| contains information for the failed request.
+ // Returns true if the missing resource is found.
+ virtual bool HandleMissingResource(const IconRequest& request);
+
+ Profile* profile_;
+
+ private:
+ // Defines the allowed pixel sizes for requested favicons.
+ enum IconSize {
+ SIZE_16,
+ SIZE_32,
+ SIZE_64,
+ NUM_SIZES
+ };
+
void Init(Profile* profile, IconType type);
// Called when favicon data is available from the history backend.
« no previous file with comments | « chrome/browser/resources/shared/js/util.js ('k') | chrome/browser/ui/webui/favicon_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698