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

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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DEVELOPERPRIVATE_AUTOUPDATE) 181 DEVELOPERPRIVATE_AUTOUPDATE)
182 182
183 protected: 183 protected:
184 ~DeveloperPrivateAutoUpdateFunction() override; 184 ~DeveloperPrivateAutoUpdateFunction() override;
185 185
186 // ExtensionFunction: 186 // ExtensionFunction:
187 bool RunSync() override; 187 bool RunSync() override;
188 }; 188 };
189 189
190 class DeveloperPrivateGetItemsInfoFunction 190 class DeveloperPrivateGetItemsInfoFunction
191 : public ChromeAsyncExtensionFunction { 191 : public DeveloperPrivateAPIFunction {
192 public: 192 public:
193 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", 193 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo",
194 DEVELOPERPRIVATE_GETITEMSINFO) 194 DEVELOPERPRIVATE_GETITEMSINFO)
195 195 DeveloperPrivateGetItemsInfoFunction();
196 protected:
197 ~DeveloperPrivateGetItemsInfoFunction() override;
198
199 // ExtensionFunction:
200 bool RunAsync() override;
201 196
202 private: 197 private:
203 scoped_ptr<developer::ItemInfo> CreateItemInfo(const Extension& item, 198 ~DeveloperPrivateGetItemsInfoFunction() override;
204 bool item_is_enabled); 199 ResponseAction Run() override;
205 200
206 void GetIconsOnFileThread( 201 void GetIconsOnFileThread(
207 ItemInfoList item_list, 202 std::map<std::string, ExtensionResource> resource_map);
208 std::map<std::string, ExtensionResource> itemIdToIconResourceMap); 203 void Finish();
209 204
210 // Helper that lists the current inspectable html pages for the extension. 205 ItemInfoList item_list_;
211 void GetInspectablePagesForExtensionProcess( 206 };
212 const Extension* extension,
213 const std::set<content::RenderViewHost*>& views,
214 ItemInspectViewList* result);
215 207
216 ItemInspectViewList GetInspectablePagesForExtension( 208 class DeveloperPrivateGetExtensionsInfoFunction
217 const Extension* extension, 209 : public DeveloperPrivateAPIFunction {
218 bool extension_is_enabled); 210 public:
211 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionsInfo",
212 DEVELOPERPRIVATE_GETEXTENSIONSINFO);
219 213
220 void GetAppWindowPagesForExtensionProfile(const Extension* extension, 214 private:
221 ItemInspectViewList* result); 215 ~DeveloperPrivateGetExtensionsInfoFunction() override;
222 216
223 linked_ptr<developer::ItemInspectView> constructInspectView( 217 ResponseAction Run() override;
224 const GURL& url, 218 };
not at google - send to devlin 2015/03/11 17:43:05 Was this lack of a blank line intentional?
Devlin 2015/03/11 21:45:53 Nope.
225 int render_process_id, 219 class DeveloperPrivateGetExtensionInfoFunction
226 int render_view_id, 220 : public DeveloperPrivateAPIFunction {
227 bool incognito, 221 public:
228 bool generated_background_page); 222 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionInfo",
223 DEVELOPERPRIVATE_GETEXTENSIONINFO);
224
225 private:
226 ~DeveloperPrivateGetExtensionInfoFunction() override;
227
228 ResponseAction Run() override;
229 }; 229 };
230 230
231 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction { 231 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction {
232 public: 232 public:
233 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", 233 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect",
234 DEVELOPERPRIVATE_INSPECT) 234 DEVELOPERPRIVATE_INSPECT)
235 235
236 protected: 236 protected:
237 ~DeveloperPrivateInspectFunction() override; 237 ~DeveloperPrivateInspectFunction() override;
238 238
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 protected: 473 protected:
474 ~DeveloperPrivateOpenDevToolsFunction() override; 474 ~DeveloperPrivateOpenDevToolsFunction() override;
475 ResponseAction Run() override; 475 ResponseAction Run() 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