Chromium Code Reviews| 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 "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" | 9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" |
| 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 | 126 |
| 127 // ExtensionFunction: | 127 // ExtensionFunction: |
| 128 virtual bool RunImpl() OVERRIDE; | 128 virtual bool RunImpl() OVERRIDE; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 class DeveloperPrivateGetItemsInfoFunction : public AsyncExtensionFunction { | 131 class DeveloperPrivateGetItemsInfoFunction : public AsyncExtensionFunction { |
| 132 public: | 132 public: |
| 133 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", | 133 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", |
| 134 DEVELOPERPRIVATE_GETITEMSINFO) | 134 DEVELOPERPRIVATE_GETITEMSINFO) |
| 135 | 135 |
| 136 DeveloperPrivateGetItemsInfoFunction(); | |
| 137 | |
| 136 protected: | 138 protected: |
| 137 virtual ~DeveloperPrivateGetItemsInfoFunction(); | 139 virtual ~DeveloperPrivateGetItemsInfoFunction(); |
| 138 | 140 |
| 139 // ExtensionFunction: | 141 // ExtensionFunction: |
| 140 virtual bool RunImpl() OVERRIDE; | 142 virtual bool RunImpl() OVERRIDE; |
| 141 | 143 |
| 142 private: | 144 private: |
| 145 // List of extensions/apps items to return. | |
|
Finnur
2013/09/30 15:11:21
This serves more of a purpose than returning data.
dvh-g
2013/10/01 04:19:26
Actually, this class will return the list of exten
Finnur
2013/10/01 11:14:15
Yes. My point was that you use this data structure
dvh
2013/10/02 05:15:08
Done.
| |
| 146 ItemInfoList item_list_; | |
| 147 | |
| 148 // Index of the extension/app in |item_list_| for which we need to load the | |
| 149 // icon. | |
| 150 unsigned int icon_to_load_; | |
|
Finnur
2013/09/30 15:11:21
Style guide says don't use unsigned types.
http://
dvh-g
2013/10/01 04:19:26
Done.
| |
| 143 | 151 |
| 144 scoped_ptr<developer::ItemInfo> CreateItemInfo( | 152 scoped_ptr<developer::ItemInfo> CreateItemInfo( |
| 145 const extensions::Extension& item, | 153 const extensions::Extension& item, |
| 146 bool item_is_enabled); | 154 bool item_is_enabled); |
| 147 | 155 |
| 148 void GetIconsOnFileThread( | |
| 149 ItemInfoList item_list, | |
| 150 std::map<std::string, ExtensionResource> itemIdToIconResourceMap); | |
| 151 | |
| 152 // Helper that lists the current inspectable html pages for the extension. | 156 // Helper that lists the current inspectable html pages for the extension. |
| 153 void GetInspectablePagesForExtensionProcess( | 157 void GetInspectablePagesForExtensionProcess( |
| 154 const Extension* extension, | 158 const Extension* extension, |
| 155 const std::set<content::RenderViewHost*>& views, | 159 const std::set<content::RenderViewHost*>& views, |
| 156 ItemInspectViewList* result); | 160 ItemInspectViewList* result); |
| 157 | 161 |
| 158 ItemInspectViewList GetInspectablePagesForExtension( | 162 ItemInspectViewList GetInspectablePagesForExtension( |
| 159 const extensions::Extension* extension, | 163 const extensions::Extension* extension, |
| 160 bool extension_is_enabled); | 164 bool extension_is_enabled); |
| 161 | 165 |
| 162 void GetShellWindowPagesForExtensionProfile( | 166 void GetShellWindowPagesForExtensionProfile( |
| 163 const extensions::Extension* extension, | 167 const extensions::Extension* extension, |
| 164 ItemInspectViewList* result); | 168 ItemInspectViewList* result); |
| 165 | 169 |
| 166 linked_ptr<developer::ItemInspectView> constructInspectView( | 170 linked_ptr<developer::ItemInspectView> constructInspectView( |
| 167 const GURL& url, | 171 const GURL& url, |
| 168 int render_process_id, | 172 int render_process_id, |
| 169 int render_view_id, | 173 int render_view_id, |
| 170 bool incognito, | 174 bool incognito, |
| 171 bool generated_background_page); | 175 bool generated_background_page); |
| 176 | |
| 177 // Request icon the the extension/app at the index |icon_to_load_| in | |
|
Finnur
2013/09/30 15:11:21
A question from the quick-and-dirty-haiku-dude:
W
dvh-g
2013/10/01 04:19:26
I'll try to. Fixing it.
| |
| 178 // |item_list_|. | |
| 179 void RequestNextIcon(); | |
| 180 | |
| 181 // Called the icon requested byRequestNextIcon() has been loaded. | |
|
Finnur
2013/09/30 15:11:21
nit: This also needs a bit of rewording. Suggest:
dvh-g
2013/10/01 04:19:26
Done.
| |
| 182 void LoadIconFinished(const GURL& url); | |
| 172 }; | 183 }; |
| 173 | 184 |
| 174 class DeveloperPrivateInspectFunction : public SyncExtensionFunction { | 185 class DeveloperPrivateInspectFunction : public SyncExtensionFunction { |
| 175 public: | 186 public: |
| 176 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", | 187 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", |
| 177 DEVELOPERPRIVATE_INSPECT) | 188 DEVELOPERPRIVATE_INSPECT) |
| 178 | 189 |
| 179 protected: | 190 protected: |
| 180 virtual ~DeveloperPrivateInspectFunction(); | 191 virtual ~DeveloperPrivateInspectFunction(); |
| 181 | 192 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 | 434 |
| 424 void GetUnpackedExtension(const base::FilePath& path, | 435 void GetUnpackedExtension(const base::FilePath& path, |
| 425 const ExtensionSet* extensions); | 436 const ExtensionSet* extensions); |
| 426 }; | 437 }; |
| 427 | 438 |
| 428 } // namespace api | 439 } // namespace api |
| 429 | 440 |
| 430 } // namespace extensions | 441 } // namespace extensions |
| 431 | 442 |
| 432 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ | 443 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ |
| OLD | NEW |