| 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_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 GetFactoryInstance(); | 29 GetFactoryInstance(); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 friend class BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>; | 32 friend class BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>; |
| 33 | 33 |
| 34 // ExtensionRegistryObserver implementation. | 34 // ExtensionRegistryObserver implementation. |
| 35 void OnExtensionLoaded(content::BrowserContext* browser_context, | 35 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 36 const Extension* extension) override; | 36 const Extension* extension) override; |
| 37 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 37 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 38 const Extension* extension, | 38 const Extension* extension, |
| 39 UnloadedExtensionInfo::Reason reason) override; | 39 UnloadedExtensionReason reason) override; |
| 40 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 40 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 41 const Extension* extension, | 41 const Extension* extension, |
| 42 UninstallReason reason) override; | 42 UninstallReason reason) override; |
| 43 | 43 |
| 44 void OnExtensionSystemReady(content::BrowserContext* context); | 44 void OnExtensionSystemReady(content::BrowserContext* context); |
| 45 | 45 |
| 46 // BrowserContextKeyedAPI implementation. | 46 // BrowserContextKeyedAPI implementation. |
| 47 static const char* service_name() { | 47 static const char* service_name() { |
| 48 return "ExtensionWebUIOverrideRegistrar"; | 48 return "ExtensionWebUIOverrideRegistrar"; |
| 49 } | 49 } |
| 50 static const bool kServiceIsNULLWhileTesting = true; | 50 static const bool kServiceIsNULLWhileTesting = true; |
| 51 | 51 |
| 52 // Listen to extension load, unloaded notifications. | 52 // Listen to extension load, unloaded notifications. |
| 53 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 53 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 54 extension_registry_observer_; | 54 extension_registry_observer_; |
| 55 | 55 |
| 56 base::WeakPtrFactory<ExtensionWebUIOverrideRegistrar> weak_factory_; | 56 base::WeakPtrFactory<ExtensionWebUIOverrideRegistrar> weak_factory_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIOverrideRegistrar); | 58 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIOverrideRegistrar); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace extensions | 61 } // namespace extensions |
| 62 | 62 |
| 63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ | 63 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ |
| OLD | NEW |