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/macros.h" | 10 #include "base/macros.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // Provides access to loader state method: scripts_ready(). | 35 // Provides access to loader state method: scripts_ready(). |
36 bool scripts_ready() const { return loader_.scripts_ready(); } | 36 bool scripts_ready() const { return loader_.scripts_ready(); } |
37 | 37 |
38 private: | 38 private: |
39 // ExtensionRegistryObserver implementation. | 39 // ExtensionRegistryObserver implementation. |
40 void OnExtensionLoaded(content::BrowserContext* browser_context, | 40 void OnExtensionLoaded(content::BrowserContext* browser_context, |
41 const Extension* extension) override; | 41 const Extension* extension) override; |
42 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 42 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
43 const Extension* extension, | 43 const Extension* extension, |
44 UnloadedExtensionInfo::Reason reason) override; | 44 UnloadedExtensionReason reason) override; |
45 | 45 |
46 // Gets an extension's scripts' metadata; i.e., gets a list of UserScript | 46 // Gets an extension's scripts' metadata; i.e., gets a list of UserScript |
47 // objects that contains script info, but not the contents of the scripts. | 47 // objects that contains script info, but not the contents of the scripts. |
48 std::unique_ptr<UserScriptList> GetScriptsMetadata( | 48 std::unique_ptr<UserScriptList> GetScriptsMetadata( |
49 const Extension* extension); | 49 const Extension* extension); |
50 | 50 |
51 // Script loader that handles loading contents of scripts into shared memory | 51 // Script loader that handles loading contents of scripts into shared memory |
52 // and notifying renderers of scripts in shared memory. | 52 // and notifying renderers of scripts in shared memory. |
53 ExtensionUserScriptLoader loader_; | 53 ExtensionUserScriptLoader loader_; |
54 | 54 |
55 // The profile for which the scripts managed here are installed. | 55 // The profile for which the scripts managed here are installed. |
56 Profile* profile_; | 56 Profile* profile_; |
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(SharedUserScriptMaster); | 61 DISALLOW_COPY_AND_ASSIGN(SharedUserScriptMaster); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace extensions | 64 } // namespace extensions |
65 | 65 |
66 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_SHARED_USER_SCRIPT_MASTER_H_ |
OLD | NEW |