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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 class EntryPicker; | 41 class EntryPicker; |
42 class EntryPickerClient; | 42 class EntryPickerClient; |
43 | 43 |
44 namespace developer_private { | 44 namespace developer_private { |
45 | 45 |
46 struct ItemInfo; | 46 struct ItemInfo; |
47 struct ItemInspectView; | 47 struct ItemInspectView; |
48 struct ProjectInfo; | 48 struct ProjectInfo; |
49 | 49 |
| 50 namespace RequestFileSource { |
| 51 struct Params; |
| 52 } |
| 53 |
50 } // namespace developer_private | 54 } // namespace developer_private |
51 | 55 |
52 } // namespace api | 56 } // namespace api |
53 | 57 |
54 namespace developer = api::developer_private; | 58 namespace developer = api::developer_private; |
55 | 59 |
56 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList; | 60 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList; |
57 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList; | 61 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList; |
58 typedef std::vector<linked_ptr<developer::ItemInspectView> > | 62 typedef std::vector<linked_ptr<developer::ItemInspectView> > |
59 ItemInspectViewList; | 63 ItemInspectViewList; |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 440 |
437 private: | 441 private: |
438 int pending_copy_operations_count_; | 442 int pending_copy_operations_count_; |
439 | 443 |
440 // This is set to false if any of the copyFile operations fail on | 444 // This is set to false if any of the copyFile operations fail on |
441 // call of the API. It is returned as a response of the API call. | 445 // call of the API. It is returned as a response of the API call. |
442 bool success_; | 446 bool success_; |
443 }; | 447 }; |
444 | 448 |
445 class DeveloperPrivateRequestFileSourceFunction | 449 class DeveloperPrivateRequestFileSourceFunction |
446 : public ChromeAsyncExtensionFunction { | 450 : public DeveloperPrivateAPIFunction { |
447 public: | 451 public: |
448 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource", | 452 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource", |
449 DEVELOPERPRIVATE_REQUESTFILESOURCE); | 453 DEVELOPERPRIVATE_REQUESTFILESOURCE); |
450 | |
451 DeveloperPrivateRequestFileSourceFunction(); | 454 DeveloperPrivateRequestFileSourceFunction(); |
452 | 455 |
453 protected: | 456 protected: |
454 ~DeveloperPrivateRequestFileSourceFunction() override; | 457 ~DeveloperPrivateRequestFileSourceFunction() override; |
455 | 458 ResponseAction Run() override; |
456 // ExtensionFunction: | |
457 bool RunAsync() override; | |
458 | 459 |
459 private: | 460 private: |
460 void LaunchCallback(const base::DictionaryValue& results); | 461 void Finish(const std::string& file_contents); |
| 462 |
| 463 scoped_ptr<api::developer_private::RequestFileSource::Params> params_; |
461 }; | 464 }; |
462 | 465 |
463 class DeveloperPrivateOpenDevToolsFunction | 466 class DeveloperPrivateOpenDevToolsFunction |
464 : public ChromeAsyncExtensionFunction { | 467 : public DeveloperPrivateAPIFunction { |
465 public: | 468 public: |
466 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", | 469 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", |
467 DEVELOPERPRIVATE_OPENDEVTOOLS); | 470 DEVELOPERPRIVATE_OPENDEVTOOLS); |
468 | |
469 DeveloperPrivateOpenDevToolsFunction(); | 471 DeveloperPrivateOpenDevToolsFunction(); |
470 | 472 |
471 protected: | 473 protected: |
472 ~DeveloperPrivateOpenDevToolsFunction() override; | 474 ~DeveloperPrivateOpenDevToolsFunction() override; |
473 | 475 ResponseAction Run() override; |
474 // ExtensionFunction: | |
475 bool RunAsync() override; | |
476 }; | 476 }; |
477 | 477 |
478 } // namespace api | 478 } // namespace api |
479 | 479 |
480 } // namespace extensions | 480 } // namespace extensions |
481 | 481 |
482 #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 |