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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 const ui::SelectFileDialog::FileTypeInfo& info, | 305 const ui::SelectFileDialog::FileTypeInfo& info, |
306 int file_type_index); | 306 int file_type_index); |
307 }; | 307 }; |
308 | 308 |
309 | 309 |
310 class DeveloperPrivateLoadUnpackedFunction | 310 class DeveloperPrivateLoadUnpackedFunction |
311 : public DeveloperPrivateChooseEntryFunction { | 311 : public DeveloperPrivateChooseEntryFunction { |
312 public: | 312 public: |
313 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadUnpacked", | 313 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadUnpacked", |
314 DEVELOPERPRIVATE_LOADUNPACKED); | 314 DEVELOPERPRIVATE_LOADUNPACKED); |
| 315 DeveloperPrivateLoadUnpackedFunction(); |
315 | 316 |
316 protected: | 317 protected: |
317 ~DeveloperPrivateLoadUnpackedFunction() override; | 318 ~DeveloperPrivateLoadUnpackedFunction() override; |
318 ResponseAction Run() override; | 319 ResponseAction Run() override; |
319 | 320 |
320 // EntryPickerClient: | 321 // EntryPickerClient: |
321 void FileSelected(const base::FilePath& path) override; | 322 void FileSelected(const base::FilePath& path) override; |
322 void FileSelectionCanceled() override; | 323 void FileSelectionCanceled() override; |
| 324 |
| 325 // Callback for the UnpackedLoader. |
| 326 void OnLoadComplete(const Extension* extension, |
| 327 const base::FilePath& file_path, |
| 328 const std::string& error); |
| 329 |
| 330 private: |
| 331 // Whether or not we should fail quietly in the event of a load error. |
| 332 bool fail_quietly_; |
323 }; | 333 }; |
324 | 334 |
325 class DeveloperPrivateChoosePathFunction | 335 class DeveloperPrivateChoosePathFunction |
326 : public DeveloperPrivateChooseEntryFunction { | 336 : public DeveloperPrivateChooseEntryFunction { |
327 public: | 337 public: |
328 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath", | 338 DECLARE_EXTENSION_FUNCTION("developerPrivate.choosePath", |
329 DEVELOPERPRIVATE_CHOOSEPATH); | 339 DEVELOPERPRIVATE_CHOOSEPATH); |
330 | 340 |
331 protected: | 341 protected: |
332 ~DeveloperPrivateChoosePathFunction() override; | 342 ~DeveloperPrivateChoosePathFunction() override; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 473 |
464 // ExtensionFunction: | 474 // ExtensionFunction: |
465 bool RunAsync() override; | 475 bool RunAsync() override; |
466 }; | 476 }; |
467 | 477 |
468 } // namespace api | 478 } // namespace api |
469 | 479 |
470 } // namespace extensions | 480 } // namespace extensions |
471 | 481 |
472 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 482 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
OLD | NEW |