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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 void OnSetFunctionNames(const std::vector<std::string>& names); | 182 void OnSetFunctionNames(const std::vector<std::string>& names); |
183 void OnSetScriptingWhitelist( | 183 void OnSetScriptingWhitelist( |
184 const ExtensionsClient::ScriptingWhitelist& extension_ids); | 184 const ExtensionsClient::ScriptingWhitelist& extension_ids); |
185 void OnSetSystemFont(const std::string& font_family, | 185 void OnSetSystemFont(const std::string& font_family, |
186 const std::string& font_size); | 186 const std::string& font_size); |
187 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id); | 187 void OnShouldSuspend(const std::string& extension_id, uint64 sequence_id); |
188 void OnSuspend(const std::string& extension_id); | 188 void OnSuspend(const std::string& extension_id); |
189 void OnTransferBlobs(const std::vector<std::string>& blob_uuids); | 189 void OnTransferBlobs(const std::vector<std::string>& blob_uuids); |
190 void OnUnloaded(const std::string& id); | 190 void OnUnloaded(const std::string& id); |
191 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params); | 191 void OnUpdatePermissions(const ExtensionMsg_UpdatePermissions_Params& params); |
| 192 void OnUpdateTabSpecificPermissions(const GURL& visible_url, |
| 193 const std::string& extension_id, |
| 194 const URLPatternSet& new_hosts, |
| 195 bool update_origin_whitelist, |
| 196 int tab_id); |
| 197 void OnClearTabSpecificPermissions( |
| 198 const std::vector<std::string>& extension_ids, |
| 199 bool update_origin_whitelist, |
| 200 int tab_id); |
192 void OnUsingWebRequestAPI(bool webrequest_used); | 201 void OnUsingWebRequestAPI(bool webrequest_used); |
193 | 202 |
194 // UserScriptSetManager::Observer implementation. | 203 // UserScriptSetManager::Observer implementation. |
195 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, | 204 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, |
196 const std::vector<UserScript*>& scripts) override; | 205 const std::vector<UserScript*>& scripts) override; |
197 | 206 |
198 void UpdateActiveExtensions(); | 207 void UpdateActiveExtensions(); |
199 | 208 |
200 // Sets up the host permissions for |extension|. | 209 // Sets up the host permissions for |extension|. |
201 void InitOriginPermissions(const Extension* extension); | 210 void InitOriginPermissions(const Extension* extension); |
202 | 211 |
203 // Updates the host permissions for extension to include only those in | 212 // Updates the host permissions for the extension url to include only those in |
204 // |new_patterns|, and remove from |old_patterns| that are no longer allowed. | 213 // |new_patterns|, and remove from |old_patterns| that are no longer allowed. |
205 void UpdateOriginPermissions(const Extension* extension, | 214 void UpdateOriginPermissions(const GURL& extension_url, |
206 const URLPatternSet& old_patterns, | 215 const URLPatternSet& old_patterns, |
207 const URLPatternSet& new_patterns); | 216 const URLPatternSet& new_patterns); |
208 | 217 |
209 // Enable custom element whitelist in Apps. | 218 // Enable custom element whitelist in Apps. |
210 void EnableCustomElementWhiteList(); | 219 void EnableCustomElementWhiteList(); |
211 | 220 |
212 // Adds or removes bindings for every context belonging to |extension_id|, or | 221 // Adds or removes bindings for every context belonging to |extension_id|, or |
213 // or all contexts if |extension_id| is empty. | 222 // or all contexts if |extension_id| is empty. |
214 void UpdateBindings(const std::string& extension_id); | 223 void UpdateBindings(const std::string& extension_id); |
215 | 224 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 324 |
316 // Status of webrequest usage. | 325 // Status of webrequest usage. |
317 bool webrequest_used_; | 326 bool webrequest_used_; |
318 | 327 |
319 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 328 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
320 }; | 329 }; |
321 | 330 |
322 } // namespace extensions | 331 } // namespace extensions |
323 | 332 |
324 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ | 333 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ |
OLD | NEW |