| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // they have. See also VisitRegisteredExtension below. Ownership of |version| | 23 // they have. See also VisitRegisteredExtension below. Ownership of |version| |
| 24 // is not transferred to the visitor. Callers of the methods below must | 24 // is not transferred to the visitor. Callers of the methods below must |
| 25 // ensure that |id| is a valid extension id (use Extension::IdIsValid(id)). | 25 // ensure that |id| is a valid extension id (use Extension::IdIsValid(id)). |
| 26 class VisitorInterface { | 26 class VisitorInterface { |
| 27 public: | 27 public: |
| 28 virtual void OnExternalExtensionFileFound( | 28 virtual void OnExternalExtensionFileFound( |
| 29 const std::string& id, | 29 const std::string& id, |
| 30 const Version* version, | 30 const Version* version, |
| 31 const FilePath& path, | 31 const FilePath& path, |
| 32 Extension::Location location, | 32 Extension::Location location, |
| 33 int creation_flags) = 0; | 33 int creation_flags, |
| 34 bool mark_acknowledged) = 0; |
| 34 | 35 |
| 35 virtual void OnExternalExtensionUpdateUrlFound( | 36 virtual void OnExternalExtensionUpdateUrlFound( |
| 36 const std::string& id, | 37 const std::string& id, |
| 37 const GURL& update_url, | 38 const GURL& update_url, |
| 38 Extension::Location location) = 0; | 39 Extension::Location location) = 0; |
| 39 | 40 |
| 40 // Called after all the external extensions have been reported | 41 // Called after all the external extensions have been reported |
| 41 // through the above two methods. |provider| is a pointer to the | 42 // through the above two methods. |provider| is a pointer to the |
| 42 // provider that is now ready (typically this), and the | 43 // provider that is now ready (typically this), and the |
| 43 // implementation of OnExternalProviderReady() should be able to | 44 // implementation of OnExternalProviderReady() should be able to |
| (...skipping 28 matching lines...) Expand all Loading... |
| 72 | 73 |
| 73 // Determines if this provider had loaded the list of external extensions | 74 // Determines if this provider had loaded the list of external extensions |
| 74 // from its source. | 75 // from its source. |
| 75 virtual bool IsReady() const = 0; | 76 virtual bool IsReady() const = 0; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 typedef std::vector<linked_ptr<ExternalExtensionProviderInterface> > | 79 typedef std::vector<linked_ptr<ExternalExtensionProviderInterface> > |
| 79 ProviderCollection; | 80 ProviderCollection; |
| 80 | 81 |
| 81 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ | 82 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_INTERFACE_H_ |
| OLD | NEW |