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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // The master is going away; don't call it back. | 84 // The master is going away; don't call it back. |
85 void DisownMaster() { | 85 void DisownMaster() { |
86 master_ = NULL; | 86 master_ = NULL; |
87 } | 87 } |
88 | 88 |
89 private: | 89 private: |
90 FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, SkipBOMAtTheBeginning); | 90 FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, SkipBOMAtTheBeginning); |
91 FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, LeaveBOMNotAtTheBeginning); | 91 FRIEND_TEST_ALL_PREFIXES(UserScriptMasterTest, LeaveBOMNotAtTheBeginning); |
92 friend class base::RefCountedThreadSafe<UserScriptMaster::ScriptReloader>; | 92 friend class base::RefCountedThreadSafe<UserScriptMaster::ScriptReloader>; |
93 | 93 |
94 ~ScriptReloader() {} | 94 ~ScriptReloader(); |
95 | 95 |
96 // Where functions are run: | 96 // Where functions are run: |
97 // master file | 97 // master file |
98 // StartLoad -> RunLoad | 98 // StartLoad -> RunLoad |
99 // LoadUserScripts() | 99 // LoadUserScripts() |
100 // NotifyMaster <- RunLoad | 100 // NotifyMaster <- RunLoad |
101 | 101 |
102 // Runs on the master thread. | 102 // Runs on the master thread. |
103 // Notify the master that new scripts are available. | 103 // Notify the master that new scripts are available. |
104 void NotifyMaster(base::SharedMemory* memory); | 104 void NotifyMaster(base::SharedMemory* memory); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 // The profile for which the scripts managed here are installed. | 166 // The profile for which the scripts managed here are installed. |
167 Profile* profile_; | 167 Profile* profile_; |
168 | 168 |
169 DISALLOW_COPY_AND_ASSIGN(UserScriptMaster); | 169 DISALLOW_COPY_AND_ASSIGN(UserScriptMaster); |
170 }; | 170 }; |
171 | 171 |
172 } // namespace extensions | 172 } // namespace extensions |
173 | 173 |
174 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ | 174 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_MASTER_H_ |
OLD | NEW |