| 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_RENDERER_DISPATCHER_H_ | 5 #ifndef EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ | 6 #define EXTENSIONS_RENDERER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 void OnUsingWebRequestAPI(bool webrequest_used); | 185 void OnUsingWebRequestAPI(bool webrequest_used); |
| 186 | 186 |
| 187 // UserScriptSet::Observer implementation. | 187 // UserScriptSet::Observer implementation. |
| 188 virtual void OnUserScriptsUpdated( | 188 virtual void OnUserScriptsUpdated( |
| 189 const std::set<std::string>& changed_extensions, | 189 const std::set<std::string>& changed_extensions, |
| 190 const std::vector<UserScript*>& scripts) OVERRIDE; | 190 const std::vector<UserScript*>& scripts) OVERRIDE; |
| 191 | 191 |
| 192 void UpdateActiveExtensions(); | 192 void UpdateActiveExtensions(); |
| 193 | 193 |
| 194 // Sets up the host permissions for |extension|. | 194 // Sets up the host permissions for |extension|. |
| 195 void InitOriginPermissions(const Extension* extension); | 195 void UpdateOriginPermissions(const Extension* extension); |
| 196 void UpdateOriginPermissions(UpdatedExtensionPermissionsInfo::Reason reason, | |
| 197 const Extension* extension, | |
| 198 const URLPatternSet& origins); | |
| 199 | 196 |
| 200 // Enable custom element whitelist in Apps. | 197 // Enable custom element whitelist in Apps. |
| 201 void EnableCustomElementWhiteList(); | 198 void EnableCustomElementWhiteList(); |
| 202 | 199 |
| 203 // Adds or removes bindings for every context belonging to |extension_id|, or | 200 // Adds or removes bindings for every context belonging to |extension_id|, or |
| 204 // or all contexts if |extension_id| is empty. | 201 // or all contexts if |extension_id| is empty. |
| 205 void UpdateBindings(const std::string& extension_id); | 202 void UpdateBindings(const std::string& extension_id); |
| 206 | 203 |
| 207 void UpdateBindingsForContext(ScriptContext* context); | 204 void UpdateBindingsForContext(ScriptContext* context); |
| 208 | 205 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // the observer is destroyed before the UserScriptSet. | 292 // the observer is destroyed before the UserScriptSet. |
| 296 ScopedObserver<UserScriptSet, UserScriptSet::Observer> | 293 ScopedObserver<UserScriptSet, UserScriptSet::Observer> |
| 297 user_script_set_observer_; | 294 user_script_set_observer_; |
| 298 | 295 |
| 299 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 296 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 300 }; | 297 }; |
| 301 | 298 |
| 302 } // namespace extensions | 299 } // namespace extensions |
| 303 | 300 |
| 304 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 301 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
| OLD | NEW |