Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 989813002: [Extensions] Make a chrome.developerPrivate.getExtensionsInfo function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 DEVELOPERPRIVATE_AUTOUPDATE) 177 DEVELOPERPRIVATE_AUTOUPDATE)
178 178
179 protected: 179 protected:
180 ~DeveloperPrivateAutoUpdateFunction() override; 180 ~DeveloperPrivateAutoUpdateFunction() override;
181 181
182 // ExtensionFunction: 182 // ExtensionFunction:
183 bool RunSync() override; 183 bool RunSync() override;
184 }; 184 };
185 185
186 class DeveloperPrivateGetItemsInfoFunction 186 class DeveloperPrivateGetItemsInfoFunction
187 : public ChromeAsyncExtensionFunction { 187 : public DeveloperPrivateAPIFunction {
188 public: 188 public:
189 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", 189 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo",
190 DEVELOPERPRIVATE_GETITEMSINFO) 190 DEVELOPERPRIVATE_GETITEMSINFO)
191 191 DeveloperPrivateGetItemsInfoFunction();
192 protected:
193 ~DeveloperPrivateGetItemsInfoFunction() override;
194
195 // ExtensionFunction:
196 bool RunAsync() override;
197 192
198 private: 193 private:
199 scoped_ptr<developer::ItemInfo> CreateItemInfo(const Extension& item, 194 ~DeveloperPrivateGetItemsInfoFunction() override;
200 bool item_is_enabled); 195 ResponseAction Run() override;
201 196
202 void GetIconsOnFileThread( 197 void GetIconsOnFileThread(
203 ItemInfoList item_list, 198 std::map<std::string, ExtensionResource> resource_map);
204 std::map<std::string, ExtensionResource> itemIdToIconResourceMap); 199 void Finish();
205 200
206 // Helper that lists the current inspectable html pages for the extension. 201 ItemInfoList item_list_;
207 void GetInspectablePagesForExtensionProcess( 202 };
208 const Extension* extension,
209 const std::set<content::RenderViewHost*>& views,
210 ItemInspectViewList* result);
211 203
212 ItemInspectViewList GetInspectablePagesForExtension( 204 class DeveloperPrivateGetExtensionsInfoFunction
213 const Extension* extension, 205 : public DeveloperPrivateAPIFunction {
214 bool extension_is_enabled); 206 public:
207 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionsInfo",
208 DEVELOPERPRIVATE_GETEXTENSIONSINFO);
215 209
216 void GetAppWindowPagesForExtensionProfile(const Extension* extension, 210 private:
217 ItemInspectViewList* result); 211 ~DeveloperPrivateGetExtensionsInfoFunction() override;
218 212
219 linked_ptr<developer::ItemInspectView> constructInspectView( 213 ResponseAction Run() override;
220 const GURL& url, 214 };
221 int render_process_id, 215 class DeveloperPrivateGetExtensionInfoFunction
222 int render_view_id, 216 : public DeveloperPrivateAPIFunction {
223 bool incognito, 217 public:
224 bool generated_background_page); 218 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionInfo",
219 DEVELOPERPRIVATE_GETEXTENSIONINFO);
220
221 private:
222 ~DeveloperPrivateGetExtensionInfoFunction() override;
223
224 ResponseAction Run() override;
225 }; 225 };
226 226
227 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction { 227 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction {
228 public: 228 public:
229 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", 229 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect",
230 DEVELOPERPRIVATE_INSPECT) 230 DEVELOPERPRIVATE_INSPECT)
231 231
232 protected: 232 protected:
233 ~DeveloperPrivateInspectFunction() override; 233 ~DeveloperPrivateInspectFunction() override;
234 234
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 // ExtensionFunction: 474 // ExtensionFunction:
475 bool RunAsync() override; 475 bool RunAsync() override;
476 }; 476 };
477 477
478 } // namespace api 478 } // namespace api
479 479
480 } // namespace extensions 480 } // namespace extensions
481 481
482 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 482 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698