Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ | 6 #define EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 | 45 |
| 46 // Return true if the extension install will proceed. Install might not | 46 // Return true if the extension install will proceed. Install might not |
| 47 // proceed if the extension is already installed from a higher priority | 47 // proceed if the extension is already installed from a higher priority |
| 48 // location. | 48 // location. |
| 49 virtual bool OnExternalExtensionUpdateUrlFound( | 49 virtual bool OnExternalExtensionUpdateUrlFound( |
| 50 const std::string& id, | 50 const std::string& id, |
| 51 const std::string& install_parameter, | 51 const std::string& install_parameter, |
| 52 const GURL& update_url, | 52 const GURL& update_url, |
| 53 Manifest::Location location, | 53 Manifest::Location location, |
| 54 int creation_flags, | 54 int creation_flags, |
| 55 bool mark_acknowledged) = 0; | 55 bool mark_acknowledged, |
| 56 bool is_initial_load) = 0; | |
| 56 | 57 |
| 57 // Called after all the external extensions have been reported | 58 // Called after all the external extensions have been reported |
| 58 // through the above two methods. |provider| is a pointer to the | 59 // through the above two methods. |provider| is a pointer to the |
| 59 // provider that is now ready (typically this), and the | 60 // provider that is now ready (typically this), and the |
| 60 // implementation of OnExternalProviderReady() should be able to | 61 // implementation of OnExternalProviderReady() should be able to |
| 61 // safely assert that provider->IsReady(). | 62 // safely assert that provider->IsReady(). |
| 62 virtual void OnExternalProviderReady( | 63 virtual void OnExternalProviderReady( |
| 63 const ExternalProviderInterface* provider) = 0; | 64 const ExternalProviderInterface* provider) = 0; |
| 64 | 65 |
| 66 // Once this provider becomes "ready", it can send additional external | |
| 67 // extensions it learns about later on through | |
| 68 // OnExternalExtensionUpdateUrlFound() or OnExternalExtensionFileFound(). | |
| 69 // This method will be called each time the provider finds a set of | |
| 70 // updated external extensions. | |
| 71 virtual void OnExternalProviderUpdateComplete( | |
| 72 const ExternalProviderInterface* provider, | |
| 73 const std::set<std::string>& removed_extensions) = 0; | |
|
asargent_no_longer_on_chrome
2016/01/20 22:49:00
It seems a little asymmetric that this function ge
lazyboy
2016/01/21 21:02:12
Yes.
See my reply in your other comment in Extensi
| |
| 74 | |
| 65 protected: | 75 protected: |
| 66 virtual ~VisitorInterface() {} | 76 virtual ~VisitorInterface() {} |
| 67 }; | 77 }; |
| 68 | 78 |
| 69 virtual ~ExternalProviderInterface() {} | 79 virtual ~ExternalProviderInterface() {} |
| 70 | 80 |
| 71 // The visitor (ExtensionsService) calls this function before it goes away. | 81 // The visitor (ExtensionsService) calls this function before it goes away. |
| 72 virtual void ServiceShutdown() = 0; | 82 virtual void ServiceShutdown() = 0; |
| 73 | 83 |
| 74 // Enumerate registered extensions, calling | 84 // Enumerate registered extensions, calling |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 92 // from its source. | 102 // from its source. |
| 93 virtual bool IsReady() const = 0; | 103 virtual bool IsReady() const = 0; |
| 94 }; | 104 }; |
| 95 | 105 |
| 96 typedef std::vector<linked_ptr<ExternalProviderInterface> > | 106 typedef std::vector<linked_ptr<ExternalProviderInterface> > |
| 97 ProviderCollection; | 107 ProviderCollection; |
| 98 | 108 |
| 99 } // namespace extensions | 109 } // namespace extensions |
| 100 | 110 |
| 101 #endif // EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ | 111 #endif // EXTENSIONS_BROWSER_EXTERNAL_PROVIDER_INTERFACE_H_ |
| OLD | NEW |