| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 // Called when the favicon data is missing to perform additional checks to | 99 // Called when the favicon data is missing to perform additional checks to |
| 100 // locate the resource. | 100 // locate the resource. |
| 101 // |request| contains information for the failed request. | 101 // |request| contains information for the failed request. |
| 102 // Returns true if the missing resource is found. | 102 // Returns true if the missing resource is found. |
| 103 virtual bool HandleMissingResource(const IconRequest& request); | 103 virtual bool HandleMissingResource(const IconRequest& request); |
| 104 | 104 |
| 105 Profile* profile_; | 105 Profile* profile_; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 FRIEND_TEST_ALL_PREFIXES(FaviconSourceTest, InstantParsing); | |
| 109 FRIEND_TEST_ALL_PREFIXES(FaviconSourceTest, Parsing); | |
| 110 | |
| 111 // Defines the allowed pixel sizes for requested favicons. | 108 // Defines the allowed pixel sizes for requested favicons. |
| 112 enum IconSize { | 109 enum IconSize { |
| 113 SIZE_16, | 110 SIZE_16, |
| 114 SIZE_32, | 111 SIZE_32, |
| 115 SIZE_64, | 112 SIZE_64, |
| 116 NUM_SIZES | 113 NUM_SIZES |
| 117 }; | 114 }; |
| 118 | 115 |
| 119 // Called when favicon data is available from the history backend. | 116 // Called when favicon data is available from the history backend. |
| 120 void OnFaviconDataAvailable( | 117 void OnFaviconDataAvailable( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 134 // database doesn't have a favicon for a webpage. Indexed by IconSize values. | 131 // database doesn't have a favicon for a webpage. Indexed by IconSize values. |
| 135 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; | 132 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; |
| 136 | 133 |
| 137 // The favicon_base::IconTypes of icon that this FaviconSource handles. | 134 // The favicon_base::IconTypes of icon that this FaviconSource handles. |
| 138 int icon_types_; | 135 int icon_types_; |
| 139 | 136 |
| 140 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 137 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
| 141 }; | 138 }; |
| 142 | 139 |
| 143 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 140 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
| OLD | NEW |