| 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_USER_SCRIPT_MASTER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const content::NotificationDetails& details) OVERRIDE; | 73 const content::NotificationDetails& details) OVERRIDE; |
| 74 | 74 |
| 75 // ExtensionRegistryObserver implementation. | 75 // ExtensionRegistryObserver implementation. |
| 76 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 76 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 77 const Extension* extension) OVERRIDE; | 77 const Extension* extension) OVERRIDE; |
| 78 virtual void OnExtensionUnloaded( | 78 virtual void OnExtensionUnloaded( |
| 79 content::BrowserContext* browser_context, | 79 content::BrowserContext* browser_context, |
| 80 const Extension* extension, | 80 const Extension* extension, |
| 81 UnloadedExtensionInfo::Reason reason) OVERRIDE; | 81 UnloadedExtensionInfo::Reason reason) OVERRIDE; |
| 82 | 82 |
| 83 // Called when ExtensionSystem is ready. |
| 84 void OnExtensionsReady(); |
| 85 |
| 83 // Called once we have finished loading the scripts on the file thread. | 86 // Called once we have finished loading the scripts on the file thread. |
| 84 void OnScriptsLoaded(scoped_ptr<UserScriptList> user_scripts, | 87 void OnScriptsLoaded(scoped_ptr<UserScriptList> user_scripts, |
| 85 scoped_ptr<base::SharedMemory> shared_memory); | 88 scoped_ptr<base::SharedMemory> shared_memory); |
| 86 | 89 |
| 87 // Sends the renderer process a new set of user scripts. If | 90 // Sends the renderer process a new set of user scripts. If |
| 88 // |changed_extensions| is not empty, this signals that only the scripts from | 91 // |changed_extensions| is not empty, this signals that only the scripts from |
| 89 // those extensions should be updated. Otherwise, all extensions will be | 92 // those extensions should be updated. Otherwise, all extensions will be |
| 90 // updated. | 93 // updated. |
| 91 void SendUpdate(content::RenderProcessHost* process, | 94 void SendUpdate(content::RenderProcessHost* process, |
| 92 base::SharedMemory* shared_memory, | 95 base::SharedMemory* shared_memory, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 extension_registry_observer_; | 141 extension_registry_observer_; |
| 139 | 142 |
| 140 base::WeakPtrFactory<UserScriptMaster> weak_factory_; | 143 base::WeakPtrFactory<UserScriptMaster> weak_factory_; |
| 141 | 144 |
| 142 DISALLOW_COPY_AND_ASSIGN(UserScriptMaster); | 145 DISALLOW_COPY_AND_ASSIGN(UserScriptMaster); |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace extensions | 148 } // namespace extensions |
| 146 | 149 |
| 147 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ | 150 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ |
| OLD | NEW |