| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| 7 | 7 |
| 8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
| 9 #include "chrome/browser/extensions/user_script_loader.h" | 9 #include "chrome/browser/extensions/user_script_loader.h" |
| 10 #include "extensions/browser/extension_registry_observer.h" | 10 #include "extensions/browser/extension_registry_observer.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // away if a script load is in progress. | 39 // away if a script load is in progress. |
| 40 void ClearScripts(); | 40 void ClearScripts(); |
| 41 | 41 |
| 42 const ExtensionId& extension_id() const { return extension_id_; } | 42 const ExtensionId& extension_id() const { return extension_id_; } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // ExtensionRegistryObserver implementation. | 45 // ExtensionRegistryObserver implementation. |
| 46 virtual void OnExtensionUnloaded( | 46 virtual void OnExtensionUnloaded( |
| 47 content::BrowserContext* browser_context, | 47 content::BrowserContext* browser_context, |
| 48 const Extension* extension, | 48 const Extension* extension, |
| 49 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 49 UnloadedExtensionInfo::Reason reason) override; |
| 50 | 50 |
| 51 // ID of extension that owns scripts that this component manages. | 51 // ID of extension that owns scripts that this component manages. |
| 52 ExtensionId extension_id_; | 52 ExtensionId extension_id_; |
| 53 | 53 |
| 54 // Script loader that handles loading contents of scripts into shared memory | 54 // Script loader that handles loading contents of scripts into shared memory |
| 55 // and notifying renderers of script updates. | 55 // and notifying renderers of script updates. |
| 56 UserScriptLoader loader_; | 56 UserScriptLoader loader_; |
| 57 | 57 |
| 58 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 58 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 59 extension_registry_observer_; | 59 extension_registry_observer_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); | 61 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace extensions | 64 } // namespace extensions |
| 65 | 65 |
| 66 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| OLD | NEW |