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

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

Issue 13885007: Add API to load a unpacked project to developerPrivate. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 19 matching lines...) Expand all
30 30
31 namespace api { 31 namespace api {
32 32
33 class EntryPicker; 33 class EntryPicker;
34 class EntryPickerClient; 34 class EntryPickerClient;
35 35
36 namespace developer_private { 36 namespace developer_private {
37 37
38 struct ItemInfo; 38 struct ItemInfo;
39 struct ItemInspectView; 39 struct ItemInspectView;
40 struct ProjectInfo;
40 41
41 } 42 }
42 43
43 } // namespace api 44 } // namespace api
44 45
45 } // namespace extensions 46 } // namespace extensions
46 47
47 namespace developer = extensions::api::developer_private; 48 namespace developer = extensions::api::developer_private;
48 49
49 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList; 50 typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList;
51 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList;
50 typedef std::vector<linked_ptr<developer::ItemInspectView> > 52 typedef std::vector<linked_ptr<developer::ItemInspectView> >
51 ItemInspectViewList; 53 ItemInspectViewList;
52 54
53 namespace extensions { 55 namespace extensions {
54 56
55 // The profile-keyed service that manages the DeveloperPrivate API. 57 // The profile-keyed service that manages the DeveloperPrivate API.
56 class DeveloperPrivateAPI : public ProfileKeyedService, 58 class DeveloperPrivateAPI : public ProfileKeyedService,
57 public content::NotificationObserver { 59 public content::NotificationObserver {
58 public: 60 public:
59 // Convenience method to get the DeveloperPrivateAPI for a profile. 61 // Convenience method to get the DeveloperPrivateAPI for a profile.
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 const base::PlatformFileInfo& file_info, 363 const base::PlatformFileInfo& file_info,
362 const base::FilePath& platform_path, 364 const base::FilePath& platform_path,
363 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); 365 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
364 366
365 void CopyFile(const base::FilePath& src_path, 367 void CopyFile(const base::FilePath& src_path,
366 const base::FilePath& dest_path); 368 const base::FilePath& dest_path);
367 369
368 scoped_refptr<fileapi::FileSystemContext> context_; 370 scoped_refptr<fileapi::FileSystemContext> context_;
369 }; 371 };
370 372
373 class DeveloperPrivateLoadProjectToSyncfsFunction
374 : public SyncExtensionFunction {
375 public:
376 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs",
377 DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS);
378
379 DeveloperPrivateLoadProjectToSyncfsFunction();
380
381 protected:
382 virtual ~DeveloperPrivateLoadProjectToSyncfsFunction();
383
384 // ExtensionFunction
385 virtual bool RunImpl() OVERRIDE;
386 };
387
388 class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction {
389 public:
390 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo",
391 DEVELOPERPRIVATE_GETPROJECTSINFO);
392
393 DeveloperPrivateGetProjectsInfoFunction();
394
395 protected:
396 virtual ~DeveloperPrivateGetProjectsInfoFunction();
397
398 void ReadFolder();
399
400 // ExtensionFunction
401 virtual bool RunImpl() OVERRIDE;
402 };
403
404 class DeveloperPrivateLoadProjectFunction : public SyncExtensionFunction {
405 public:
406 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProject",
407 DEVELOPERPRIVATE_LOADPROJECT);
408
409 DeveloperPrivateLoadProjectFunction();
410
411 protected:
412 virtual ~DeveloperPrivateLoadProjectFunction();
413
414 // ExtensionFunction
415 virtual bool RunImpl() OVERRIDE;
416 };
417
418
419
371 } // namespace api 420 } // namespace api
372 421
373 } // namespace extensions 422 } // namespace extensions
374 423
375 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 424 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698