Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Side by Side Diff: extensions/renderer/dispatcher.h

Issue 890083002: [Extensions] Propagate activeTab hosts to extension background pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 int tab_id);
196 void OnClearTabSpecificPermissions(
197 const std::vector<std::string>& extension_ids,
198 int tab_id);
192 void OnUsingWebRequestAPI(bool webrequest_used); 199 void OnUsingWebRequestAPI(bool webrequest_used);
193 200
194 // UserScriptSetManager::Observer implementation. 201 // UserScriptSetManager::Observer implementation.
195 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, 202 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions,
196 const std::vector<UserScript*>& scripts) override; 203 const std::vector<UserScript*>& scripts) override;
197 204
198 void UpdateActiveExtensions(); 205 void UpdateActiveExtensions();
199 206
200 // Sets up the host permissions for |extension|. 207 // Sets up the host permissions for |extension|.
201 void InitOriginPermissions(const Extension* extension); 208 void InitOriginPermissions(const Extension* extension);
202 209
203 // Updates the host permissions for extension to include only those in 210 // Updates the host permissions for extension to include only those currently
204 // |new_patterns|, and remove from |old_patterns| that are no longer allowed. 211 // in the extensions permissions, and removes any others in |old_patterns|.
205 void UpdateOriginPermissions(const Extension* extension, 212 void UpdateOriginPermissions(const Extension* extension,
206 const URLPatternSet& old_patterns, 213 const URLPatternSet& old_patterns);
207 const URLPatternSet& new_patterns);
208 214
209 // Enable custom element whitelist in Apps. 215 // Enable custom element whitelist in Apps.
210 void EnableCustomElementWhiteList(); 216 void EnableCustomElementWhiteList();
211 217
212 // Adds or removes bindings for every context belonging to |extension_id|, or 218 // Adds or removes bindings for every context belonging to |extension_id|, or
213 // or all contexts if |extension_id| is empty. 219 // or all contexts if |extension_id| is empty.
214 void UpdateBindings(const std::string& extension_id); 220 void UpdateBindings(const std::string& extension_id);
215 221
216 void UpdateBindingsForContext(ScriptContext* context); 222 void UpdateBindingsForContext(ScriptContext* context);
217 223
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 321
316 // Status of webrequest usage. 322 // Status of webrequest usage.
317 bool webrequest_used_; 323 bool webrequest_used_;
318 324
319 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 325 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
320 }; 326 };
321 327
322 } // namespace extensions 328 } // namespace extensions
323 329
324 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 330 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698