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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual ~DeveloperPrivateEventRouter(); | 66 virtual ~DeveloperPrivateEventRouter(); |
67 | 67 |
68 // Add or remove an ID to the list of extensions subscribed to events. | 68 // Add or remove an ID to the list of extensions subscribed to events. |
69 void AddExtensionId(const std::string& extension_id); | 69 void AddExtensionId(const std::string& extension_id); |
70 void RemoveExtensionId(const std::string& extension_id); | 70 void RemoveExtensionId(const std::string& extension_id); |
71 | 71 |
72 private: | 72 private: |
73 // content::NotificationObserver implementation. | 73 // content::NotificationObserver implementation. |
74 virtual void Observe(int type, | 74 virtual void Observe(int type, |
75 const content::NotificationSource& source, | 75 const content::NotificationSource& source, |
76 const content::NotificationDetails& details) OVERRIDE; | 76 const content::NotificationDetails& details) override; |
77 | 77 |
78 // ExtensionRegistryObserver implementation. | 78 // ExtensionRegistryObserver implementation. |
79 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 79 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
80 const Extension* extension) OVERRIDE; | 80 const Extension* extension) override; |
81 virtual void OnExtensionUnloaded( | 81 virtual void OnExtensionUnloaded( |
82 content::BrowserContext* browser_context, | 82 content::BrowserContext* browser_context, |
83 const Extension* extension, | 83 const Extension* extension, |
84 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 84 UnloadedExtensionInfo::Reason reason) override; |
85 virtual void OnExtensionWillBeInstalled( | 85 virtual void OnExtensionWillBeInstalled( |
86 content::BrowserContext* browser_context, | 86 content::BrowserContext* browser_context, |
87 const Extension* extension, | 87 const Extension* extension, |
88 bool is_update, | 88 bool is_update, |
89 bool from_ephemeral, | 89 bool from_ephemeral, |
90 const std::string& old_name) OVERRIDE; | 90 const std::string& old_name) override; |
91 virtual void OnExtensionUninstalled( | 91 virtual void OnExtensionUninstalled( |
92 content::BrowserContext* browser_context, | 92 content::BrowserContext* browser_context, |
93 const Extension* extension, | 93 const Extension* extension, |
94 extensions::UninstallReason reason) OVERRIDE; | 94 extensions::UninstallReason reason) override; |
95 | 95 |
96 // ErrorConsole::Observer implementation. | 96 // ErrorConsole::Observer implementation. |
97 virtual void OnErrorAdded(const ExtensionError* error) OVERRIDE; | 97 virtual void OnErrorAdded(const ExtensionError* error) override; |
98 | 98 |
99 content::NotificationRegistrar registrar_; | 99 content::NotificationRegistrar registrar_; |
100 | 100 |
101 ScopedObserver<extensions::ExtensionRegistry, | 101 ScopedObserver<extensions::ExtensionRegistry, |
102 extensions::ExtensionRegistryObserver> | 102 extensions::ExtensionRegistryObserver> |
103 extension_registry_observer_; | 103 extension_registry_observer_; |
104 | 104 |
105 Profile* profile_; | 105 Profile* profile_; |
106 | 106 |
107 // The set of IDs of the Extensions that have subscribed to DeveloperPrivate | 107 // The set of IDs of the Extensions that have subscribed to DeveloperPrivate |
(...skipping 20 matching lines...) Expand all Loading... |
128 explicit DeveloperPrivateAPI(content::BrowserContext* context); | 128 explicit DeveloperPrivateAPI(content::BrowserContext* context); |
129 virtual ~DeveloperPrivateAPI(); | 129 virtual ~DeveloperPrivateAPI(); |
130 | 130 |
131 void SetLastUnpackedDirectory(const base::FilePath& path); | 131 void SetLastUnpackedDirectory(const base::FilePath& path); |
132 | 132 |
133 base::FilePath& GetLastUnpackedDirectory() { | 133 base::FilePath& GetLastUnpackedDirectory() { |
134 return last_unpacked_directory_; | 134 return last_unpacked_directory_; |
135 } | 135 } |
136 | 136 |
137 // KeyedService implementation | 137 // KeyedService implementation |
138 virtual void Shutdown() OVERRIDE; | 138 virtual void Shutdown() override; |
139 | 139 |
140 // EventRouter::Observer implementation. | 140 // EventRouter::Observer implementation. |
141 virtual void OnListenerAdded(const EventListenerInfo& details) OVERRIDE; | 141 virtual void OnListenerAdded(const EventListenerInfo& details) override; |
142 virtual void OnListenerRemoved(const EventListenerInfo& details) OVERRIDE; | 142 virtual void OnListenerRemoved(const EventListenerInfo& details) override; |
143 | 143 |
144 private: | 144 private: |
145 friend class BrowserContextKeyedAPIFactory<DeveloperPrivateAPI>; | 145 friend class BrowserContextKeyedAPIFactory<DeveloperPrivateAPI>; |
146 | 146 |
147 // BrowserContextKeyedAPI implementation. | 147 // BrowserContextKeyedAPI implementation. |
148 static const char* service_name() { return "DeveloperPrivateAPI"; } | 148 static const char* service_name() { return "DeveloperPrivateAPI"; } |
149 static const bool kServiceRedirectedInIncognito = true; | 149 static const bool kServiceRedirectedInIncognito = true; |
150 static const bool kServiceIsNULLWhileTesting = true; | 150 static const bool kServiceIsNULLWhileTesting = true; |
151 | 151 |
152 void RegisterNotifications(); | 152 void RegisterNotifications(); |
(...skipping 14 matching lines...) Expand all Loading... |
167 | 167 |
168 class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction { | 168 class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction { |
169 public: | 169 public: |
170 DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate", | 170 DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate", |
171 DEVELOPERPRIVATE_AUTOUPDATE) | 171 DEVELOPERPRIVATE_AUTOUPDATE) |
172 | 172 |
173 protected: | 173 protected: |
174 virtual ~DeveloperPrivateAutoUpdateFunction(); | 174 virtual ~DeveloperPrivateAutoUpdateFunction(); |
175 | 175 |
176 // ExtensionFunction: | 176 // ExtensionFunction: |
177 virtual bool RunSync() OVERRIDE; | 177 virtual bool RunSync() override; |
178 }; | 178 }; |
179 | 179 |
180 class DeveloperPrivateGetItemsInfoFunction | 180 class DeveloperPrivateGetItemsInfoFunction |
181 : public ChromeAsyncExtensionFunction { | 181 : public ChromeAsyncExtensionFunction { |
182 public: | 182 public: |
183 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", | 183 DECLARE_EXTENSION_FUNCTION("developerPrivate.getItemsInfo", |
184 DEVELOPERPRIVATE_GETITEMSINFO) | 184 DEVELOPERPRIVATE_GETITEMSINFO) |
185 | 185 |
186 protected: | 186 protected: |
187 virtual ~DeveloperPrivateGetItemsInfoFunction(); | 187 virtual ~DeveloperPrivateGetItemsInfoFunction(); |
188 | 188 |
189 // ExtensionFunction: | 189 // ExtensionFunction: |
190 virtual bool RunAsync() OVERRIDE; | 190 virtual bool RunAsync() override; |
191 | 191 |
192 private: | 192 private: |
193 scoped_ptr<developer::ItemInfo> CreateItemInfo(const Extension& item, | 193 scoped_ptr<developer::ItemInfo> CreateItemInfo(const Extension& item, |
194 bool item_is_enabled); | 194 bool item_is_enabled); |
195 | 195 |
196 void GetIconsOnFileThread( | 196 void GetIconsOnFileThread( |
197 ItemInfoList item_list, | 197 ItemInfoList item_list, |
198 std::map<std::string, ExtensionResource> itemIdToIconResourceMap); | 198 std::map<std::string, ExtensionResource> itemIdToIconResourceMap); |
199 | 199 |
200 // Helper that lists the current inspectable html pages for the extension. | 200 // Helper that lists the current inspectable html pages for the extension. |
(...skipping 19 matching lines...) Expand all Loading... |
220 | 220 |
221 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction { | 221 class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction { |
222 public: | 222 public: |
223 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", | 223 DECLARE_EXTENSION_FUNCTION("developerPrivate.inspect", |
224 DEVELOPERPRIVATE_INSPECT) | 224 DEVELOPERPRIVATE_INSPECT) |
225 | 225 |
226 protected: | 226 protected: |
227 virtual ~DeveloperPrivateInspectFunction(); | 227 virtual ~DeveloperPrivateInspectFunction(); |
228 | 228 |
229 // ExtensionFunction: | 229 // ExtensionFunction: |
230 virtual bool RunSync() OVERRIDE; | 230 virtual bool RunSync() override; |
231 }; | 231 }; |
232 | 232 |
233 class DeveloperPrivateAllowFileAccessFunction | 233 class DeveloperPrivateAllowFileAccessFunction |
234 : public ChromeSyncExtensionFunction { | 234 : public ChromeSyncExtensionFunction { |
235 public: | 235 public: |
236 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess", | 236 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess", |
237 DEVELOPERPRIVATE_ALLOWFILEACCESS); | 237 DEVELOPERPRIVATE_ALLOWFILEACCESS); |
238 | 238 |
239 protected: | 239 protected: |
240 virtual ~DeveloperPrivateAllowFileAccessFunction(); | 240 virtual ~DeveloperPrivateAllowFileAccessFunction(); |
241 | 241 |
242 // ExtensionFunction: | 242 // ExtensionFunction: |
243 virtual bool RunSync() OVERRIDE; | 243 virtual bool RunSync() override; |
244 }; | 244 }; |
245 | 245 |
246 class DeveloperPrivateAllowIncognitoFunction | 246 class DeveloperPrivateAllowIncognitoFunction |
247 : public ChromeSyncExtensionFunction { | 247 : public ChromeSyncExtensionFunction { |
248 public: | 248 public: |
249 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowIncognito", | 249 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowIncognito", |
250 DEVELOPERPRIVATE_ALLOWINCOGNITO); | 250 DEVELOPERPRIVATE_ALLOWINCOGNITO); |
251 | 251 |
252 protected: | 252 protected: |
253 virtual ~DeveloperPrivateAllowIncognitoFunction(); | 253 virtual ~DeveloperPrivateAllowIncognitoFunction(); |
254 | 254 |
255 // ExtensionFunction: | 255 // ExtensionFunction: |
256 virtual bool RunSync() OVERRIDE; | 256 virtual bool RunSync() override; |
257 }; | 257 }; |
258 | 258 |
259 class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction { | 259 class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction { |
260 public: | 260 public: |
261 DECLARE_EXTENSION_FUNCTION("developerPrivate.reload", | 261 DECLARE_EXTENSION_FUNCTION("developerPrivate.reload", |
262 DEVELOPERPRIVATE_RELOAD); | 262 DEVELOPERPRIVATE_RELOAD); |
263 | 263 |
264 protected: | 264 protected: |
265 virtual ~DeveloperPrivateReloadFunction(); | 265 virtual ~DeveloperPrivateReloadFunction(); |
266 | 266 |
267 // ExtensionFunction: | 267 // ExtensionFunction: |
268 virtual bool RunSync() OVERRIDE; | 268 virtual bool RunSync() override; |
269 }; | 269 }; |
270 | 270 |
271 class DeveloperPrivateShowPermissionsDialogFunction | 271 class DeveloperPrivateShowPermissionsDialogFunction |
272 : public ChromeSyncExtensionFunction, | 272 : public ChromeSyncExtensionFunction, |
273 public ExtensionInstallPrompt::Delegate { | 273 public ExtensionInstallPrompt::Delegate { |
274 public: | 274 public: |
275 DECLARE_EXTENSION_FUNCTION("developerPrivate.showPermissionsDialog", | 275 DECLARE_EXTENSION_FUNCTION("developerPrivate.showPermissionsDialog", |
276 DEVELOPERPRIVATE_PERMISSIONS); | 276 DEVELOPERPRIVATE_PERMISSIONS); |
277 | 277 |
278 DeveloperPrivateShowPermissionsDialogFunction(); | 278 DeveloperPrivateShowPermissionsDialogFunction(); |
279 protected: | 279 protected: |
280 virtual ~DeveloperPrivateShowPermissionsDialogFunction(); | 280 virtual ~DeveloperPrivateShowPermissionsDialogFunction(); |
281 | 281 |
282 // ExtensionFunction: | 282 // ExtensionFunction: |
283 virtual bool RunSync() OVERRIDE; | 283 virtual bool RunSync() override; |
284 | 284 |
285 // Overridden from ExtensionInstallPrompt::Delegate | 285 // Overridden from ExtensionInstallPrompt::Delegate |
286 virtual void InstallUIProceed() OVERRIDE; | 286 virtual void InstallUIProceed() override; |
287 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; | 287 virtual void InstallUIAbort(bool user_initiated) override; |
288 | 288 |
289 scoped_ptr<ExtensionInstallPrompt> prompt_; | 289 scoped_ptr<ExtensionInstallPrompt> prompt_; |
290 std::string extension_id_; | 290 std::string extension_id_; |
291 }; | 291 }; |
292 | 292 |
293 class DeveloperPrivateEnableFunction | 293 class DeveloperPrivateEnableFunction |
294 : public ChromeSyncExtensionFunction, | 294 : public ChromeSyncExtensionFunction, |
295 public base::SupportsWeakPtr<DeveloperPrivateEnableFunction> { | 295 public base::SupportsWeakPtr<DeveloperPrivateEnableFunction> { |
296 public: | 296 public: |
297 DECLARE_EXTENSION_FUNCTION("developerPrivate.enable", | 297 DECLARE_EXTENSION_FUNCTION("developerPrivate.enable", |
298 DEVELOPERPRIVATE_ENABLE); | 298 DEVELOPERPRIVATE_ENABLE); |
299 | 299 |
300 DeveloperPrivateEnableFunction(); | 300 DeveloperPrivateEnableFunction(); |
301 | 301 |
302 protected: | 302 protected: |
303 virtual ~DeveloperPrivateEnableFunction(); | 303 virtual ~DeveloperPrivateEnableFunction(); |
304 | 304 |
305 // Callback for requirements checker. | 305 // Callback for requirements checker. |
306 void OnRequirementsChecked(const std::string& extension_id, | 306 void OnRequirementsChecked(const std::string& extension_id, |
307 std::vector<std::string> requirements_errors); | 307 std::vector<std::string> requirements_errors); |
308 // ExtensionFunction: | 308 // ExtensionFunction: |
309 virtual bool RunSync() OVERRIDE; | 309 virtual bool RunSync() override; |
310 | 310 |
311 private: | 311 private: |
312 scoped_ptr<RequirementsChecker> requirements_checker_; | 312 scoped_ptr<RequirementsChecker> requirements_checker_; |
313 }; | 313 }; |
314 | 314 |
315 class DeveloperPrivateChooseEntryFunction : public ChromeAsyncExtensionFunction, | 315 class DeveloperPrivateChooseEntryFunction : public ChromeAsyncExtensionFunction, |
316 public EntryPickerClient { | 316 public EntryPickerClient { |
317 protected: | 317 protected: |
318 virtual ~DeveloperPrivateChooseEntryFunction(); | 318 virtual ~DeveloperPrivateChooseEntryFunction(); |
319 virtual bool RunAsync() OVERRIDE; | 319 virtual bool RunAsync() override; |
320 bool ShowPicker(ui::SelectFileDialog::Type picker_type, | 320 bool ShowPicker(ui::SelectFileDialog::Type picker_type, |
321 const base::FilePath& last_directory, | 321 const base::FilePath& last_directory, |
322 const base::string16& select_title, | 322 const base::string16& select_title, |
323 const ui::SelectFileDialog::FileTypeInfo& info, | 323 const ui::SelectFileDialog::FileTypeInfo& info, |
324 int file_type_index); | 324 int file_type_index); |
325 | 325 |
326 // EntryPickerClient functions. | 326 // EntryPickerClient functions. |
327 virtual void FileSelected(const base::FilePath& path) = 0; | 327 virtual void FileSelected(const base::FilePath& path) = 0; |
328 virtual void FileSelectionCanceled() = 0; | 328 virtual void FileSelectionCanceled() = 0; |
329 }; | 329 }; |
330 | 330 |
331 | 331 |
332 class DeveloperPrivateLoadUnpackedFunction | 332 class DeveloperPrivateLoadUnpackedFunction |
333 : public DeveloperPrivateChooseEntryFunction { | 333 : public DeveloperPrivateChooseEntryFunction { |
334 public: | 334 public: |
335 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadUnpacked", | 335 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadUnpacked", |
336 DEVELOPERPRIVATE_LOADUNPACKED); | 336 DEVELOPERPRIVATE_LOADUNPACKED); |
337 | 337 |
338 protected: | 338 protected: |
339 virtual ~DeveloperPrivateLoadUnpackedFunction(); | 339 virtual ~DeveloperPrivateLoadUnpackedFunction(); |
340 virtual bool RunAsync() OVERRIDE; | 340 virtual bool RunAsync() override; |
341 | 341 |
342 // EntryPickerCLient implementation. | 342 // EntryPickerCLient implementation. |
343 virtual void FileSelected(const base::FilePath& path) OVERRIDE; | 343 virtual void FileSelected(const base::FilePath& path) override; |
344 virtual void FileSelectionCanceled() OVERRIDE; | 344 virtual void FileSelectionCanceled() override; |
345 }; | 345 }; |
346 | 346 |
347 class DeveloperPrivateChoosePathFunction | 347 class DeveloperPrivateChoosePathFunction |
348 : public DeveloperPrivateChooseEntryFunction { | 348 : public DeveloperPrivateChooseEntryFunction { |
349 public: | 349 public: |
350 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath", | 350 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath", |
351 DEVELOPERPRIVATE_CHOOSEPATH); | 351 DEVELOPERPRIVATE_CHOOSEPATH); |
352 | 352 |
353 protected: | 353 protected: |
354 virtual ~DeveloperPrivateChoosePathFunction(); | 354 virtual ~DeveloperPrivateChoosePathFunction(); |
355 virtual bool RunAsync() OVERRIDE; | 355 virtual bool RunAsync() override; |
356 | 356 |
357 // EntryPickerClient functions. | 357 // EntryPickerClient functions. |
358 virtual void FileSelected(const base::FilePath& path) OVERRIDE; | 358 virtual void FileSelected(const base::FilePath& path) override; |
359 virtual void FileSelectionCanceled() OVERRIDE; | 359 virtual void FileSelectionCanceled() override; |
360 }; | 360 }; |
361 | 361 |
362 class DeveloperPrivatePackDirectoryFunction | 362 class DeveloperPrivatePackDirectoryFunction |
363 : public ChromeAsyncExtensionFunction, | 363 : public ChromeAsyncExtensionFunction, |
364 public PackExtensionJob::Client { | 364 public PackExtensionJob::Client { |
365 | 365 |
366 public: | 366 public: |
367 DECLARE_EXTENSION_FUNCTION("developerPrivate.packDirectory", | 367 DECLARE_EXTENSION_FUNCTION("developerPrivate.packDirectory", |
368 DEVELOPERPRIVATE_PACKDIRECTORY); | 368 DEVELOPERPRIVATE_PACKDIRECTORY); |
369 | 369 |
370 DeveloperPrivatePackDirectoryFunction(); | 370 DeveloperPrivatePackDirectoryFunction(); |
371 | 371 |
372 // ExtensionPackJob::Client implementation. | 372 // ExtensionPackJob::Client implementation. |
373 virtual void OnPackSuccess(const base::FilePath& crx_file, | 373 virtual void OnPackSuccess(const base::FilePath& crx_file, |
374 const base::FilePath& key_file) OVERRIDE; | 374 const base::FilePath& key_file) override; |
375 virtual void OnPackFailure(const std::string& error, | 375 virtual void OnPackFailure(const std::string& error, |
376 ExtensionCreator::ErrorType error_type) OVERRIDE; | 376 ExtensionCreator::ErrorType error_type) override; |
377 | 377 |
378 protected: | 378 protected: |
379 virtual ~DeveloperPrivatePackDirectoryFunction(); | 379 virtual ~DeveloperPrivatePackDirectoryFunction(); |
380 virtual bool RunAsync() OVERRIDE; | 380 virtual bool RunAsync() override; |
381 | 381 |
382 private: | 382 private: |
383 scoped_refptr<PackExtensionJob> pack_job_; | 383 scoped_refptr<PackExtensionJob> pack_job_; |
384 std::string item_path_str_; | 384 std::string item_path_str_; |
385 std::string key_path_str_; | 385 std::string key_path_str_; |
386 }; | 386 }; |
387 | 387 |
388 class DeveloperPrivateIsProfileManagedFunction | 388 class DeveloperPrivateIsProfileManagedFunction |
389 : public ChromeSyncExtensionFunction { | 389 : public ChromeSyncExtensionFunction { |
390 public: | 390 public: |
391 DECLARE_EXTENSION_FUNCTION("developerPrivate.isProfileManaged", | 391 DECLARE_EXTENSION_FUNCTION("developerPrivate.isProfileManaged", |
392 DEVELOPERPRIVATE_ISPROFILEMANAGED); | 392 DEVELOPERPRIVATE_ISPROFILEMANAGED); |
393 | 393 |
394 protected: | 394 protected: |
395 virtual ~DeveloperPrivateIsProfileManagedFunction(); | 395 virtual ~DeveloperPrivateIsProfileManagedFunction(); |
396 | 396 |
397 // ExtensionFunction: | 397 // ExtensionFunction: |
398 virtual bool RunSync() OVERRIDE; | 398 virtual bool RunSync() override; |
399 }; | 399 }; |
400 | 400 |
401 class DeveloperPrivateLoadDirectoryFunction | 401 class DeveloperPrivateLoadDirectoryFunction |
402 : public ChromeAsyncExtensionFunction { | 402 : public ChromeAsyncExtensionFunction { |
403 public: | 403 public: |
404 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadDirectory", | 404 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadDirectory", |
405 DEVELOPERPRIVATE_LOADUNPACKEDCROS); | 405 DEVELOPERPRIVATE_LOADUNPACKEDCROS); |
406 | 406 |
407 DeveloperPrivateLoadDirectoryFunction(); | 407 DeveloperPrivateLoadDirectoryFunction(); |
408 | 408 |
409 protected: | 409 protected: |
410 virtual ~DeveloperPrivateLoadDirectoryFunction(); | 410 virtual ~DeveloperPrivateLoadDirectoryFunction(); |
411 | 411 |
412 // ExtensionFunction: | 412 // ExtensionFunction: |
413 virtual bool RunAsync() OVERRIDE; | 413 virtual bool RunAsync() override; |
414 | 414 |
415 bool LoadByFileSystemAPI(const storage::FileSystemURL& directory_url); | 415 bool LoadByFileSystemAPI(const storage::FileSystemURL& directory_url); |
416 | 416 |
417 void ClearExistingDirectoryContent(const base::FilePath& project_path); | 417 void ClearExistingDirectoryContent(const base::FilePath& project_path); |
418 | 418 |
419 void ReadDirectoryByFileSystemAPI(const base::FilePath& project_path, | 419 void ReadDirectoryByFileSystemAPI(const base::FilePath& project_path, |
420 const base::FilePath& destination_path); | 420 const base::FilePath& destination_path); |
421 | 421 |
422 void ReadDirectoryByFileSystemAPICb( | 422 void ReadDirectoryByFileSystemAPICb( |
423 const base::FilePath& project_path, | 423 const base::FilePath& project_path, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 public: | 459 public: |
460 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource", | 460 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource", |
461 DEVELOPERPRIVATE_REQUESTFILESOURCE); | 461 DEVELOPERPRIVATE_REQUESTFILESOURCE); |
462 | 462 |
463 DeveloperPrivateRequestFileSourceFunction(); | 463 DeveloperPrivateRequestFileSourceFunction(); |
464 | 464 |
465 protected: | 465 protected: |
466 virtual ~DeveloperPrivateRequestFileSourceFunction(); | 466 virtual ~DeveloperPrivateRequestFileSourceFunction(); |
467 | 467 |
468 // ExtensionFunction: | 468 // ExtensionFunction: |
469 virtual bool RunAsync() OVERRIDE; | 469 virtual bool RunAsync() override; |
470 | 470 |
471 private: | 471 private: |
472 void LaunchCallback(const base::DictionaryValue& results); | 472 void LaunchCallback(const base::DictionaryValue& results); |
473 }; | 473 }; |
474 | 474 |
475 class DeveloperPrivateOpenDevToolsFunction | 475 class DeveloperPrivateOpenDevToolsFunction |
476 : public ChromeAsyncExtensionFunction { | 476 : public ChromeAsyncExtensionFunction { |
477 public: | 477 public: |
478 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", | 478 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", |
479 DEVELOPERPRIVATE_OPENDEVTOOLS); | 479 DEVELOPERPRIVATE_OPENDEVTOOLS); |
480 | 480 |
481 DeveloperPrivateOpenDevToolsFunction(); | 481 DeveloperPrivateOpenDevToolsFunction(); |
482 | 482 |
483 protected: | 483 protected: |
484 virtual ~DeveloperPrivateOpenDevToolsFunction(); | 484 virtual ~DeveloperPrivateOpenDevToolsFunction(); |
485 | 485 |
486 // ExtensionFunction: | 486 // ExtensionFunction: |
487 virtual bool RunAsync() OVERRIDE; | 487 virtual bool RunAsync() override; |
488 }; | 488 }; |
489 | 489 |
490 } // namespace api | 490 } // namespace api |
491 | 491 |
492 } // namespace extensions | 492 } // namespace extensions |
493 | 493 |
494 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 494 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
OLD | NEW |