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_MANAGER_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/linked_ptr.h" | |
12 | |
13 class Profile; | |
14 | |
15 namespace extensions { | |
Devlin
2014/12/12 20:02:45
hmm... actually, for as long as this class is in c
Xi Han
2014/12/12 20:32:31
That is ok, add the namespace back.
| |
16 class DeclarativeUserScriptMaster; | |
17 } | |
18 | |
19 using UserScriptMasterMap = | |
Devlin
2014/12/12 20:02:45
nit: When I mentioned this should go above class m
Xi Han
2014/12/12 20:32:31
Done.
| |
20 std::map<std::string, linked_ptr<extensions::DeclarativeUserScriptMaster>>; | |
21 | |
22 // Manages a set of DeclarativeUserScriptMaster objects for script injections. | |
23 class DeclarativeUserScriptManager { | |
24 public: | |
25 explicit DeclarativeUserScriptManager(Profile* profile); | |
26 ~DeclarativeUserScriptManager(); | |
27 | |
28 // Get the user script master for declarative scripts; if does not exist, a | |
Devlin
2014/12/12 20:02:45
nit: "if one does not exist" instead of "if does n
Xi Han
2014/12/12 20:32:31
Done.
Xi Han
2014/12/12 20:32:31
Done.
| |
29 // new object will be created. | |
30 extensions::DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByID( | |
31 const std::string& id); | |
32 | |
33 private: | |
34 // Manages a set of DeclarativeUserScript objects for programmatically | |
Devlin
2014/12/12 20:02:45
This seems more like a comment of the full class (
Xi Han
2014/12/12 20:32:31
Sounds better. Updated.
| |
35 // declared scripts. The objects are instantiated lazily. | |
36 UserScriptMasterMap declarative_user_script_masters_; | |
37 | |
38 Profile* profile_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptManager); | |
41 }; | |
42 | |
43 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ | |
OLD | NEW |