| 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_SHARED_USER_SCRIPT_MASTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| 11 #include "chrome/browser/extensions/user_script_loader.h" | 11 #include "chrome/browser/extensions/extension_user_script_loader.h" |
| 12 #include "extensions/browser/extension_registry_observer.h" | 12 #include "extensions/browser/extension_registry_observer.h" |
| 13 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
| 14 #include "extensions/common/user_script.h" | 14 #include "extensions/common/user_script.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 class BrowserContext; | 17 class BrowserContext; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 41 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 41 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 42 const Extension* extension, | 42 const Extension* extension, |
| 43 UnloadedExtensionInfo::Reason reason) override; | 43 UnloadedExtensionInfo::Reason reason) override; |
| 44 | 44 |
| 45 // Gets an extension's scripts' metadata; i.e., gets a list of UserScript | 45 // Gets an extension's scripts' metadata; i.e., gets a list of UserScript |
| 46 // objects that contains script info, but not the contents of the scripts. | 46 // objects that contains script info, but not the contents of the scripts. |
| 47 const std::set<UserScript> GetScriptsMetadata(const Extension* extension); | 47 const std::set<UserScript> GetScriptsMetadata(const Extension* extension); |
| 48 | 48 |
| 49 // Script loader that handles loading contents of scripts into shared memory | 49 // Script loader that handles loading contents of scripts into shared memory |
| 50 // and notifying renderers of scripts in shared memory. | 50 // and notifying renderers of scripts in shared memory. |
| 51 UserScriptLoader loader_; | 51 ExtensionUserScriptLoader loader_; |
| 52 | 52 |
| 53 // The profile for which the scripts managed here are installed. | 53 // The profile for which the scripts managed here are installed. |
| 54 Profile* profile_; | 54 Profile* profile_; |
| 55 | 55 |
| 56 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 56 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 57 extension_registry_observer_; | 57 extension_registry_observer_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(SharedUserScriptMaster); | 59 DISALLOW_COPY_AND_ASSIGN(SharedUserScriptMaster); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace extensions | 62 } // namespace extensions |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ | 64 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ |
| OLD | NEW |