| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FALLBACK_ICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_FALLBACK_ICON_SOURCE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_FALLBACK_ICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_FALLBACK_ICON_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/favicon_base/fallback_icon_service.h" | 9 #include "components/favicon/core/fallback_icon_service.h" |
| 10 #include "content/public/browser/url_data_source.h" | 10 #include "content/public/browser/url_data_source.h" |
| 11 | 11 |
| 12 // FallbackIconSource services explicit chrome:// requests for fallback icons. | 12 // FallbackIconSource services explicit chrome:// requests for fallback icons. |
| 13 // | 13 // |
| 14 // Format: | 14 // Format: |
| 15 // chrome://fallback-icon/size,bc,tc,fsr,r/url | 15 // chrome://fallback-icon/size,bc,tc,fsr,r/url |
| 16 // All of the parameters except for the url are optional. However, the order of | 16 // All of the parameters except for the url are optional. However, the order of |
| 17 // the parameters is not interchangeable, and all "," must be in place. | 17 // the parameters is not interchangeable, and all "," must be in place. |
| 18 // | 18 // |
| 19 // Parameter: | 19 // Parameter: |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const content::URLDataSource::GotDataCallback& callback) override; | 54 const content::URLDataSource::GotDataCallback& callback) override; |
| 55 std::string GetMimeType(const std::string&) const override; | 55 std::string GetMimeType(const std::string&) const override; |
| 56 bool ShouldReplaceExistingSource() const override; | 56 bool ShouldReplaceExistingSource() const override; |
| 57 bool ShouldServiceRequest(const net::URLRequest* request) const override; | 57 bool ShouldServiceRequest(const net::URLRequest* request) const override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // Sends the default fallback icon. | 60 // Sends the default fallback icon. |
| 61 void SendDefaultResponse( | 61 void SendDefaultResponse( |
| 62 const content::URLDataSource::GotDataCallback& callback); | 62 const content::URLDataSource::GotDataCallback& callback); |
| 63 | 63 |
| 64 scoped_ptr<favicon_base::FallbackIconService> fallback_icon_service_; | 64 scoped_ptr<FallbackIconService> fallback_icon_service_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(FallbackIconSource); | 66 DISALLOW_COPY_AND_ASSIGN(FallbackIconSource); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 #endif // CHROME_BROWSER_UI_WEBUI_FALLBACK_ICON_SOURCE_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_FALLBACK_ICON_SOURCE_H_ |
| OLD | NEW |