| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 FaviconSource(Profile* profile, IconType type); | 69 FaviconSource(Profile* profile, IconType type); |
| 70 | 70 |
| 71 // content::URLDataSource implementation. | 71 // content::URLDataSource implementation. |
| 72 virtual std::string GetSource() OVERRIDE; | 72 virtual std::string GetSource() OVERRIDE; |
| 73 virtual void StartDataRequest( | 73 virtual void StartDataRequest( |
| 74 const std::string& path, | 74 const std::string& path, |
| 75 bool is_incognito, | 75 bool is_incognito, |
| 76 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 76 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
| 77 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 77 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
| 78 virtual bool ShouldReplaceExistingSource() const OVERRIDE; | 78 virtual bool ShouldReplaceExistingSource() const OVERRIDE; |
| 79 virtual bool ShouldServiceRequest( |
| 80 const net::URLRequest* request) const OVERRIDE; |
| 79 | 81 |
| 80 protected: | 82 protected: |
| 81 struct IconRequest { | 83 struct IconRequest { |
| 82 IconRequest(); | 84 IconRequest(); |
| 83 IconRequest(const content::URLDataSource::GotDataCallback& cb, | 85 IconRequest(const content::URLDataSource::GotDataCallback& cb, |
| 84 const std::string& path, | 86 const std::string& path, |
| 85 int size, | 87 int size, |
| 86 ui::ScaleFactor scale); | 88 ui::ScaleFactor scale); |
| 87 ~IconRequest(); | 89 ~IconRequest(); |
| 88 | 90 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // 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. |
| 130 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; | 132 scoped_refptr<base::RefCountedMemory> default_favicons_[NUM_SIZES]; |
| 131 | 133 |
| 132 // The history::IconTypes of icon that this FaviconSource handles. | 134 // The history::IconTypes of icon that this FaviconSource handles. |
| 133 int icon_types_; | 135 int icon_types_; |
| 134 | 136 |
| 135 DISALLOW_COPY_AND_ASSIGN(FaviconSource); | 137 DISALLOW_COPY_AND_ASSIGN(FaviconSource); |
| 136 }; | 138 }; |
| 137 | 139 |
| 138 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ | 140 #endif // CHROME_BROWSER_UI_WEBUI_FAVICON_SOURCE_H_ |
| OLD | NEW |