Chromium Code Reviews| Index: chrome/browser/autocomplete/extension_app_provider.h |
| diff --git a/chrome/browser/autocomplete/extension_app_provider.h b/chrome/browser/autocomplete/extension_app_provider.h |
| index 5dbcc2638bb9259664955149f35bbe8642d5b234..f59becfea479ec037abe4def743034ba811a3232 100644 |
| --- a/chrome/browser/autocomplete/extension_app_provider.h |
| +++ b/chrome/browser/autocomplete/extension_app_provider.h |
| @@ -10,18 +10,25 @@ |
| #include "base/basictypes.h" |
| #include "base/compiler_specific.h" |
| #include "base/gtest_prod_util.h" |
| +#include "base/scoped_observer.h" |
| #include "chrome/browser/autocomplete/autocomplete_input.h" |
| #include "chrome/browser/autocomplete/autocomplete_match.h" |
| #include "chrome/browser/autocomplete/autocomplete_provider.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| +#include "extensions/browser/extension_registry_observer.h" |
| #include "ui/base/window_open_disposition.h" |
| +namespace extensions { |
| +class ExtensionRegistry; |
| +} |
| + |
| // This provider is responsible for keeping track of which Extension Apps are |
| // installed and their URLs. An instance of it gets created and managed by |
| // AutocompleteController. |
| class ExtensionAppProvider : public AutocompleteProvider, |
| - public content::NotificationObserver { |
| + public content::NotificationObserver, |
| + public extensions::ExtensionRegistryObserver { |
| public: |
| ExtensionAppProvider(AutocompleteProviderListener* listener, |
| Profile* profile); |
| @@ -81,8 +88,17 @@ class ExtensionAppProvider : public AutocompleteProvider, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) OVERRIDE; |
| + // extensions::ExtensionRegistryObserver implementation. |
|
Peter Kasting
2014/05/13 17:59:28
Nit: Trailing colon, not period
limasdf
2014/05/13 18:04:06
Yep, my bad.
One question, why some kind of commen
limasdf
2014/05/13 18:04:34
Done.
Peter Kasting
2014/05/13 18:15:26
It's basically trying to say "The following method
limasdf
2014/05/13 18:18:06
good notation. thanks!
|
| + virtual void OnExtensionLoaded( |
| + content::BrowserContext* browser_context, |
| + const extensions::Extension* extension) OVERRIDE; |
| + |
| content::NotificationRegistrar registrar_; |
| + ScopedObserver<extensions::ExtensionRegistry, |
| + extensions::ExtensionRegistryObserver> |
| + extension_registry_observer_; |
| + |
| // Our cache of ExtensionApp objects (name + url) representing the extension |
| // apps we know/care about. |
| ExtensionApps extension_apps_; |