OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ | |
7 | |
8 #include "chrome/browser/extensions/user_script_loader.h" | |
9 #include "extensions/common/extension.h" | |
10 #include "extensions/common/user_script.h" | |
Devlin
2014/08/04 18:33:24
Can just forward-declare UserScript here.
Mark Dittmer
2014/08/05 20:33:18
Done.
| |
11 | |
12 class Profile; | |
13 | |
14 namespace extensions { | |
15 | |
16 class DeclarativeUserScriptMaster { | |
Devlin
2014/08/04 18:33:24
class comments
Mark Dittmer
2014/08/05 20:33:18
Done.
| |
17 public: | |
18 DeclarativeUserScriptMaster(Profile* profile, | |
19 const ExtensionId& extension_id); | |
20 virtual ~DeclarativeUserScriptMaster(); | |
21 | |
22 // Adds script to shared memory region. This may not happen right away if a | |
23 // script load is in progress. | |
24 void AddScript(const UserScript& script); | |
25 | |
26 // Removes script from shared memory region. This may not happen right away if | |
27 // a script load is in progress. | |
28 void RemoveScript(const UserScript& script); | |
29 | |
30 // Removes all scripts from shared memory region. This may not happen right | |
31 // away if a script load is in progress. | |
32 void ClearScripts(); | |
33 | |
34 private: | |
35 // Script loader that handles loading contents of scripts into shared memory | |
36 // and notifying renderers of scripts in shared memory. | |
37 UserScriptLoader loader_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); | |
40 }; | |
41 | |
42 } // namespace extensions | |
43 | |
44 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ | |
OLD | NEW |