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

Side by Side Diff: chrome/browser/ui/webui/favicon_source.h

Issue 335233003: Convert ui::ScaleFactor -> float in favicon/history code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix size_t Created 6 years, 6 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
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_UI_WEBUI_FAVICON_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual bool ShouldReplaceExistingSource() const OVERRIDE; 81 virtual bool ShouldReplaceExistingSource() const OVERRIDE;
82 virtual bool ShouldServiceRequest( 82 virtual bool ShouldServiceRequest(
83 const net::URLRequest* request) const OVERRIDE; 83 const net::URLRequest* request) const OVERRIDE;
84 84
85 protected: 85 protected:
86 struct IconRequest { 86 struct IconRequest {
87 IconRequest(); 87 IconRequest();
88 IconRequest(const content::URLDataSource::GotDataCallback& cb, 88 IconRequest(const content::URLDataSource::GotDataCallback& cb,
89 const GURL& path, 89 const GURL& path,
90 int size, 90 int size,
91 ui::ScaleFactor scale); 91 float scale);
92 ~IconRequest(); 92 ~IconRequest();
93 93
94 content::URLDataSource::GotDataCallback callback; 94 content::URLDataSource::GotDataCallback callback;
95 GURL request_path; 95 GURL request_path;
96 int size_in_dip; 96 int size_in_dip;
97 ui::ScaleFactor scale_factor; 97 float device_scale_factor;
98 }; 98 };
99 99
100 // Called when the favicon data is missing to perform additional checks to 100 // Called when the favicon data is missing to perform additional checks to
101 // locate the resource. 101 // locate the resource.
102 // |request| contains information for the failed request. 102 // |request| contains information for the failed request.
103 // Returns true if the missing resource is found. 103 // Returns true if the missing resource is found.
104 virtual bool HandleMissingResource(const IconRequest& request); 104 virtual bool HandleMissingResource(const IconRequest& request);
105 105
106 Profile* profile_; 106 Profile* profile_;
107 107
(...skipping 27 matching lines...) Expand all
135 // database doesn't have a favicon for a webpage. Indexed by IconSize values. 135 // database doesn't have a favicon for a webpage. Indexed by IconSize values.
136 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; 136 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES];
137 137
138 // The favicon_base::IconTypes of icon that this FaviconSource handles. 138 // The favicon_base::IconTypes of icon that this FaviconSource handles.
139 int icon_types_; 139 int icon_types_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(FaviconSource); 141 DISALLOW_COPY_AND_ASSIGN(FaviconSource);
142 }; 142 };
143 143
144 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ 144 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698