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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // by |resource_id|. | 66 // by |resource_id|. |
67 static SkBitmap* LoadImageByResourceId(int resource_id); | 67 static SkBitmap* LoadImageByResourceId(int resource_id); |
68 | 68 |
69 // content::URLDataSource implementation. | 69 // content::URLDataSource implementation. |
70 std::string GetSource() const override; | 70 std::string GetSource() const override; |
71 std::string GetMimeType(const std::string&) const override; | 71 std::string GetMimeType(const std::string&) const override; |
72 void StartDataRequest( | 72 void StartDataRequest( |
73 const std::string& path, | 73 const std::string& path, |
74 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, | 74 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, |
75 const content::URLDataSource::GotDataCallback& callback) override; | 75 const content::URLDataSource::GotDataCallback& callback) override; |
| 76 bool AllowCaching() const override; |
76 | 77 |
77 private: | 78 private: |
78 // Encapsulates the request parameters for |request_id|. | 79 // Encapsulates the request parameters for |request_id|. |
79 struct ExtensionIconRequest; | 80 struct ExtensionIconRequest; |
80 | 81 |
81 ~ExtensionIconSource() override; | 82 ~ExtensionIconSource() override; |
82 | 83 |
83 // Returns the bitmap for the default app image. | 84 // Returns the bitmap for the default app image. |
84 const SkBitmap* GetDefaultAppImage(); | 85 const SkBitmap* GetDefaultAppImage(); |
85 | 86 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 std::unique_ptr<SkBitmap> default_extension_data_; | 154 std::unique_ptr<SkBitmap> default_extension_data_; |
154 | 155 |
155 base::CancelableTaskTracker cancelable_task_tracker_; | 156 base::CancelableTaskTracker cancelable_task_tracker_; |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); | 158 DISALLOW_COPY_AND_ASSIGN(ExtensionIconSource); |
158 }; | 159 }; |
159 | 160 |
160 } // namespace extensions | 161 } // namespace extensions |
161 | 162 |
162 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ | 163 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_ICON_SOURCE_H_ |
OLD | NEW |