diff options
Diffstat (limited to 'chrome/browser/extensions/api/developer_private/developer_private_api.h')
-rw-r--r-- | chrome/browser/extensions/api/developer_private/developer_private_api.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h index ac5dc5c..41d5a7f 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.h +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h @@ -133,6 +133,8 @@ class DeveloperPrivateGetItemsInfoFunction : public AsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", DEVELOPERPRIVATE_GETITEMSINFO) + DeveloperPrivateGetItemsInfoFunction(); + protected: virtual ~DeveloperPrivateGetItemsInfoFunction(); @@ -140,15 +142,19 @@ class DeveloperPrivateGetItemsInfoFunction : public AsyncExtensionFunction { virtual bool RunImpl() OVERRIDE; private: + // List of extensions/apps items to return. This list will be populated in a + // first step. Then, it will be used to keep track of items that need to be + // filled with icons. + ItemInfoList item_list_; + + // Index of the extension/app in |item_list_| for which we need to load the + // icon. + int icon_to_load_; scoped_ptr<developer::ItemInfo> CreateItemInfo( const extensions::Extension& item, bool item_is_enabled); - void GetIconsOnFileThread( - ItemInfoList item_list, - std::map<std::string, ExtensionResource> itemIdToIconResourceMap); - // Helper that lists the current inspectable html pages for the extension. void GetInspectablePagesForExtensionProcess( const Extension* extension, @@ -169,6 +175,14 @@ class DeveloperPrivateGetItemsInfoFunction : public AsyncExtensionFunction { int render_view_id, bool incognito, bool generated_background_page); + + // Request the icon of the extension/app at the index |icon_to_load_| in + // |item_list_|. + void RequestNextIcon(); + + // Called when each icon has been loaded by RequestNextIcon(). |url| is the + // data url containing the icon. + void LoadIconFinished(const GURL& url); }; class DeveloperPrivateInspectFunction : public SyncExtensionFunction { |