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

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

Issue 412643003: Fix the origin access whitelist for extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 UpdateOriginPermissions(const Extension* extension); 195 void InitOriginPermissions(const Extension* extension);
196
197 // Updates the host permissions for extension to include only those in
198 // |new_patterns|, and remove from |old_patterns| that are no longer allowed.
199 void UpdateOriginPermissions(const Extension* extension,
200 const URLPatternSet& old_patterns,
201 const URLPatternSet& new_patterns);
196 202
197 // Enable custom element whitelist in Apps. 203 // Enable custom element whitelist in Apps.
198 void EnableCustomElementWhiteList(); 204 void EnableCustomElementWhiteList();
199 205
200 // Adds or removes bindings for every context belonging to |extension_id|, or 206 // Adds or removes bindings for every context belonging to |extension_id|, or
201 // or all contexts if |extension_id| is empty. 207 // or all contexts if |extension_id| is empty.
202 void UpdateBindings(const std::string& extension_id); 208 void UpdateBindings(const std::string& extension_id);
203 209
204 void UpdateBindingsForContext(ScriptContext* context); 210 void UpdateBindingsForContext(ScriptContext* context);
205 211
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // the observer is destroyed before the UserScriptSet. 298 // the observer is destroyed before the UserScriptSet.
293 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 299 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
294 user_script_set_observer_; 300 user_script_set_observer_;
295 301
296 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 302 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
297 }; 303 };
298 304
299 } // namespace extensions 305 } // namespace extensions
300 306
301 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_ 307 #endif // EXTENSIONS_RENDERER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698