| 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 EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ | 5 #ifndef EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ |
| 6 #define EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ | 6 #define EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 std::set<HostID> changed_hosts_; | 158 std::set<HostID> changed_hosts_; |
| 159 | 159 |
| 160 // If the initial set of hosts has finished loading. | 160 // If the initial set of hosts has finished loading. |
| 161 bool ready_; | 161 bool ready_; |
| 162 | 162 |
| 163 // If list of user scripts is modified while we're loading it, we note | 163 // If list of user scripts is modified while we're loading it, we note |
| 164 // that we're currently mid-load and then start over again once the load | 164 // that we're currently mid-load and then start over again once the load |
| 165 // finishes. This boolean tracks whether another load is pending. | 165 // finishes. This boolean tracks whether another load is pending. |
| 166 bool pending_load_; | 166 bool pending_load_; |
| 167 | 167 |
| 168 // Whether or not we are currently loading. | |
| 169 bool is_loading_; | |
| 170 | |
| 171 // The browser_context for which the scripts managed here are installed. | 168 // The browser_context for which the scripts managed here are installed. |
| 172 content::BrowserContext* browser_context_; | 169 content::BrowserContext* browser_context_; |
| 173 | 170 |
| 174 // ID of the host that owns these scripts, if any. This is only set to a | 171 // ID of the host that owns these scripts, if any. This is only set to a |
| 175 // non-empty value for declarative user script shared memory regions. | 172 // non-empty value for declarative user script shared memory regions. |
| 176 HostID host_id_; | 173 HostID host_id_; |
| 177 | 174 |
| 178 // The associated observers. | 175 // The associated observers. |
| 179 base::ObserverList<Observer> observers_; | 176 base::ObserverList<Observer> observers_; |
| 180 | 177 |
| 181 base::WeakPtrFactory<UserScriptLoader> weak_factory_; | 178 base::WeakPtrFactory<UserScriptLoader> weak_factory_; |
| 182 | 179 |
| 183 DISALLOW_COPY_AND_ASSIGN(UserScriptLoader); | 180 DISALLOW_COPY_AND_ASSIGN(UserScriptLoader); |
| 184 }; | 181 }; |
| 185 | 182 |
| 186 } // namespace extensions | 183 } // namespace extensions |
| 187 | 184 |
| 188 #endif // EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ | 185 #endif // EXTENSIONS_BROWSER_USER_SCRIPT_LOADER_H_ |
| OLD | NEW |