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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // FAVICON, and default favicon. | 64 // FAVICON, and default favicon. |
65 ANY | 65 ANY |
66 }; | 66 }; |
67 | 67 |
68 // |type| is the type of icon this FaviconSource will provide. | 68 // |type| is the type of icon this FaviconSource will provide. |
69 FaviconSource(Profile* profile, IconType type); | 69 FaviconSource(Profile* profile, IconType type); |
70 | 70 |
71 virtual ~FaviconSource(); | 71 virtual ~FaviconSource(); |
72 | 72 |
73 // content::URLDataSource implementation. | 73 // content::URLDataSource implementation. |
74 virtual std::string GetSource() const OVERRIDE; | 74 virtual std::string GetSource() const override; |
75 virtual void StartDataRequest( | 75 virtual void StartDataRequest( |
76 const std::string& path, | 76 const std::string& path, |
77 int render_process_id, | 77 int render_process_id, |
78 int render_frame_id, | 78 int render_frame_id, |
79 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 79 const content::URLDataSource::GotDataCallback& callback) override; |
80 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 80 virtual std::string GetMimeType(const std::string&) const override; |
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 float scale); | 91 float scale); |
92 ~IconRequest(); | 92 ~IconRequest(); |
93 | 93 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ |
OLD | NEW |