Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 973303002: [Extensions] Make chrome://extensions use developerPrivate for error calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 430
427 private: 431 private:
428 int pending_copy_operations_count_; 432 int pending_copy_operations_count_;
429 433
430 // This is set to false if any of the copyFile operations fail on 434 // This is set to false if any of the copyFile operations fail on
431 // call of the API. It is returned as a response of the API call. 435 // call of the API. It is returned as a response of the API call.
432 bool success_; 436 bool success_;
433 }; 437 };
434 438
435 class DeveloperPrivateRequestFileSourceFunction 439 class DeveloperPrivateRequestFileSourceFunction
436 : public ChromeAsyncExtensionFunction { 440 : public DeveloperPrivateAPIFunction {
437 public: 441 public:
438 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource", 442 DECLARE_EXTENSION_FUNCTION("developerPrivate.requestFileSource",
439 DEVELOPERPRIVATE_REQUESTFILESOURCE); 443 DEVELOPERPRIVATE_REQUESTFILESOURCE);
440
441 DeveloperPrivateRequestFileSourceFunction(); 444 DeveloperPrivateRequestFileSourceFunction();
442 445
443 protected: 446 protected:
444 ~DeveloperPrivateRequestFileSourceFunction() override; 447 ~DeveloperPrivateRequestFileSourceFunction() override;
445 448 ResponseAction Run() override;
446 // ExtensionFunction:
447 bool RunAsync() override;
448 449
449 private: 450 private:
450 void LaunchCallback(const base::DictionaryValue& results); 451 void Finish(const std::string& file_contents);
452
453 scoped_ptr<api::developer_private::RequestFileSource::Params> params_;
451 }; 454 };
452 455
453 class DeveloperPrivateOpenDevToolsFunction 456 class DeveloperPrivateOpenDevToolsFunction
454 : public ChromeAsyncExtensionFunction { 457 : public DeveloperPrivateAPIFunction {
455 public: 458 public:
456 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools", 459 DECLARE_EXTENSION_FUNCTION("developerPrivate.openDevTools",
457 DEVELOPERPRIVATE_OPENDEVTOOLS); 460 DEVELOPERPRIVATE_OPENDEVTOOLS);
458
459 DeveloperPrivateOpenDevToolsFunction(); 461 DeveloperPrivateOpenDevToolsFunction();
460 462
461 protected: 463 protected:
462 ~DeveloperPrivateOpenDevToolsFunction() override; 464 ~DeveloperPrivateOpenDevToolsFunction() override;
463 465 ResponseAction Run() override;
464 // ExtensionFunction:
465 bool RunAsync() override;
466 }; 466 };
467 467
468 } // namespace api 468 } // namespace api
469 469
470 } // namespace extensions 470 } // namespace extensions
471 471
472 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 472 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698