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_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_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 int icon_size, | 64 int icon_size, |
65 ExtensionIconSet::MatchType match, | 65 ExtensionIconSet::MatchType match, |
66 bool grayscale, | 66 bool grayscale, |
67 bool* exists); | 67 bool* exists); |
68 | 68 |
69 // A public utility function for accessing the bitmap of the image specified | 69 // A public utility function for accessing the bitmap of the image specified |
70 // by |resource_id|. | 70 // by |resource_id|. |
71 static SkBitmap* LoadImageByResourceId(int resource_id); | 71 static SkBitmap* LoadImageByResourceId(int resource_id); |
72 | 72 |
73 // content::URLDataSource implementation. | 73 // content::URLDataSource implementation. |
74 virtual std::string GetSource() OVERRIDE; | 74 virtual std::string GetSource() const OVERRIDE; |
75 virtual std::string GetMimeType(const std::string&) const OVERRIDE; | 75 virtual std::string GetMimeType(const std::string&) const OVERRIDE; |
76 virtual void StartDataRequest( | 76 virtual void StartDataRequest( |
77 const std::string& path, | 77 const std::string& path, |
78 bool is_incognito, | 78 bool is_incognito, |
79 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 79 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
80 | 80 |
81 private: | 81 private: |
82 // Encapsulates the request parameters for |request_id|. | 82 // Encapsulates the request parameters for |request_id|. |
83 struct ExtensionIconRequest; | 83 struct ExtensionIconRequest; |
84 | 84 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 scoped_ptr<SkBitmap> default_app_data_; | 155 scoped_ptr<SkBitmap> default_app_data_; |
156 | 156 |
157 scoped_ptr<SkBitmap> default_extension_data_; | 157 scoped_ptr<SkBitmap> default_extension_data_; |
158 | 158 |
159 CancelableTaskTracker cancelable_task_tracker_; | 159 CancelableTaskTracker cancelable_task_tracker_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); | 161 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); |
162 }; | 162 }; |
163 | 163 |
164 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 164 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
OLD | NEW |