| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/version.h" | |
| 13 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 14 | 13 |
| 15 class FilePath; | 14 class FilePath; |
| 15 class Version; |
| 16 | 16 |
| 17 // This class is an abstract class for implementing external extensions | 17 // This class is an abstract class for implementing external extensions |
| 18 // providers. | 18 // providers. |
| 19 class ExternalExtensionProvider { | 19 class ExternalExtensionProvider { |
| 20 public: | 20 public: |
| 21 // ExternalExtensionProvider uses this interface to communicate back to the | 21 // ExternalExtensionProvider uses this interface to communicate back to the |
| 22 // caller what extensions are registered, and which |id|, |version| and |path| | 22 // caller what extensions are registered, and which |id|, |version| and |path| |
| 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. | 24 // is not transferred to the visitor. |
| 25 class Visitor { | 25 class Visitor { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 42 Visitor* visitor, const std::set<std::string>& ids_to_ignore) const = 0; | 42 Visitor* visitor, const std::set<std::string>& ids_to_ignore) const = 0; |
| 43 | 43 |
| 44 // Gets the version of extension with |id| and its |location|. |location| can | 44 // Gets the version of extension with |id| and its |location|. |location| can |
| 45 // be NULL. The caller is responsible for cleaning up the Version object | 45 // be NULL. The caller is responsible for cleaning up the Version object |
| 46 // returned. This function returns NULL if the extension is not found. | 46 // returned. This function returns NULL if the extension is not found. |
| 47 virtual Version* RegisteredVersion(const std::string& id, | 47 virtual Version* RegisteredVersion(const std::string& id, |
| 48 Extension::Location* location) const = 0; | 48 Extension::Location* location) const = 0; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_H_ | 51 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_EXTENSION_PROVIDER_H_ |
| OLD | NEW |