| 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_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 Loading... |
| 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; |
| 216 ResponseAction Run() override; |
| 217 }; |
| 222 | 218 |
| 223 linked_ptr<developer::ItemInspectView> constructInspectView( | 219 class DeveloperPrivateGetExtensionInfoFunction |
| 224 const GURL& url, | 220 : public DeveloperPrivateAPIFunction { |
| 225 int render_process_id, | 221 public: |
| 226 int render_view_id, | 222 DECLARE_EXTENSION_FUNCTION("developerPrivate.getExtensionInfo", |
| 227 bool incognito, | 223 DEVELOPERPRIVATE_GETEXTENSIONINFO); |
| 228 bool generated_background_page); | 224 |
| 225 private: |
| 226 ~DeveloperPrivateGetExtensionInfoFunction() override; |
| 227 ResponseAction Run() override; |
| 229 }; | 228 }; |
| 230 | 229 |
| 231 class DeveloperPrivateInspectFunction : public UIThreadExtensionFunction { | 230 class DeveloperPrivateInspectFunction : public UIThreadExtensionFunction { |
| 232 public: | 231 public: |
| 233 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", | 232 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", |
| 234 DEVELOPERPRIVATE_INSPECT) | 233 DEVELOPERPRIVATE_INSPECT) |
| 235 | 234 |
| 236 protected: | 235 protected: |
| 237 ~DeveloperPrivateInspectFunction() override; | 236 ~DeveloperPrivateInspectFunction() override; |
| 238 | 237 |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 protected: | 472 protected: |
| 474 ~DeveloperPrivateOpenDevToolsFunction() override; | 473 ~DeveloperPrivateOpenDevToolsFunction() override; |
| 475 ResponseAction Run() override; | 474 ResponseAction Run() override; |
| 476 }; | 475 }; |
| 477 | 476 |
| 478 } // namespace api | 477 } // namespace api |
| 479 | 478 |
| 480 } // namespace extensions | 479 } // namespace extensions |
| 481 | 480 |
| 482 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 481 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
| OLD | NEW |