| OLD | NEW |
| 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 Loading... |
| 81 bool ShouldReplaceExistingSource() const override; | 81 bool ShouldReplaceExistingSource() const override; |
| 82 bool ShouldServiceRequest(const net::URLRequest* request) const override; | 82 bool ShouldServiceRequest(const net::URLRequest* request) const override; |
| 83 | 83 |
| 84 protected: | 84 protected: |
| 85 struct IconRequest { | 85 struct IconRequest { |
| 86 IconRequest(); | 86 IconRequest(); |
| 87 IconRequest(const content::URLDataSource::GotDataCallback& cb, | 87 IconRequest(const content::URLDataSource::GotDataCallback& cb, |
| 88 const GURL& path, | 88 const GURL& path, |
| 89 int size, | 89 int size, |
| 90 float scale); | 90 float scale); |
| 91 IconRequest(const IconRequest& other); |
| 91 ~IconRequest(); | 92 ~IconRequest(); |
| 92 | 93 |
| 93 content::URLDataSource::GotDataCallback callback; | 94 content::URLDataSource::GotDataCallback callback; |
| 94 GURL request_path; | 95 GURL request_path; |
| 95 int size_in_dip; | 96 int size_in_dip; |
| 96 float device_scale_factor; | 97 float device_scale_factor; |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 // 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 |
| 100 // locate the resource. | 101 // locate the resource. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 131 // database doesn't have a favicon for a webpage. Indexed by IconSize values. | 132 // database doesn't have a favicon for a webpage. Indexed by IconSize values. |
| 132 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; | 133 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; |
| 133 | 134 |
| 134 // The favicon_base::IconTypes of icon that this FaviconSource handles. | 135 // The favicon_base::IconTypes of icon that this FaviconSource handles. |
| 135 int icon_types_; | 136 int icon_types_; |
| 136 | 137 |
| 137 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 138 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
| 138 }; | 139 }; |
| 139 | 140 |
| 140 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 141 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
| OLD | NEW |