| 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 "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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 namespace developer = extensions::api::developer_private; | 48 namespace developer = extensions::api::developer_private; |
| 49 | 49 |
| 50 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; | 51 typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList; |
| 52 typedef std::vector<linked_ptr<developer::ItemInspectView> > | 52 typedef std::vector<linked_ptr<developer::ItemInspectView> > |
| 53 ItemInspectViewList; | 53 ItemInspectViewList; |
| 54 | 54 |
| 55 namespace extensions { | 55 namespace extensions { |
| 56 | 56 |
| 57 // The profile-keyed service that manages the DeveloperPrivate API. | 57 // The profile-keyed service that manages the DeveloperPrivate API. |
| 58 class DeveloperPrivateAPI : public ProfileKeyedService, | 58 class DeveloperPrivateAPI : public BrowserContextKeyedService, |
| 59 public content::NotificationObserver { | 59 public content::NotificationObserver { |
| 60 public: | 60 public: |
| 61 // Convenience method to get the DeveloperPrivateAPI for a profile. | 61 // Convenience method to get the DeveloperPrivateAPI for a profile. |
| 62 static DeveloperPrivateAPI* Get(Profile* profile); | 62 static DeveloperPrivateAPI* Get(Profile* profile); |
| 63 | 63 |
| 64 explicit DeveloperPrivateAPI(Profile* profile); | 64 explicit DeveloperPrivateAPI(Profile* profile); |
| 65 virtual ~DeveloperPrivateAPI(); | 65 virtual ~DeveloperPrivateAPI(); |
| 66 | 66 |
| 67 void SetLastUnpackedDirectory(const base::FilePath& path); | 67 void SetLastUnpackedDirectory(const base::FilePath& path); |
| 68 | 68 |
| 69 base::FilePath& GetLastUnpackedDirectory() { | 69 base::FilePath& GetLastUnpackedDirectory() { |
| 70 return last_unpacked_directory_; | 70 return last_unpacked_directory_; |
| 71 } | 71 } |
| 72 | 72 |
| 73 // ProfileKeyedService implementation | 73 // BrowserContextKeyedService implementation |
| 74 virtual void Shutdown() OVERRIDE; | 74 virtual void Shutdown() OVERRIDE; |
| 75 | 75 |
| 76 // content::NotificationObserver implementation. | 76 // content::NotificationObserver implementation. |
| 77 virtual void Observe(int type, | 77 virtual void Observe(int type, |
| 78 const content::NotificationSource& source, | 78 const content::NotificationSource& source, |
| 79 const content::NotificationDetails& details) OVERRIDE; | 79 const content::NotificationDetails& details) OVERRIDE; |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 void RegisterNotifications(); | 82 void RegisterNotifications(); |
| 83 | 83 |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 void GetUnpackedExtension(const base::FilePath& path, | 444 void GetUnpackedExtension(const base::FilePath& path, |
| 445 const ExtensionSet* extensions); | 445 const ExtensionSet* extensions); |
| 446 }; | 446 }; |
| 447 | 447 |
| 448 } // namespace api | 448 } // namespace api |
| 449 | 449 |
| 450 } // namespace extensions | 450 } // namespace extensions |
| 451 | 451 |
| 452 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ | 452 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API
_H_ |
| OLD | NEW |