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

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

Issue 16625012: Remove ExtensionURLInfo, make security decisions in render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 7 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 | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_
6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 13 matching lines...) Expand all
24 24
25 class ChromeRenderViewTest; 25 class ChromeRenderViewTest;
26 class GURL; 26 class GURL;
27 class ModuleSystem; 27 class ModuleSystem;
28 class URLPattern; 28 class URLPattern;
29 struct ExtensionMsg_ExternalConnectionInfo; 29 struct ExtensionMsg_ExternalConnectionInfo;
30 struct ExtensionMsg_Loaded_Params; 30 struct ExtensionMsg_Loaded_Params;
31 31
32 namespace WebKit { 32 namespace WebKit {
33 class WebFrame; 33 class WebFrame;
34 class WebSecurityOrigin;
34 } 35 }
35 36
36 namespace base { 37 namespace base {
37 class DictionaryValue; 38 class DictionaryValue;
38 class ListValue; 39 class ListValue;
39 } 40 }
40 41
41 namespace content { 42 namespace content {
42 class RenderThread; 43 class RenderThread;
43 } 44 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Sets up the bindings for the given api. 224 // Sets up the bindings for the given api.
224 void InstallBindings(ModuleSystem* module_system, 225 void InstallBindings(ModuleSystem* module_system,
225 v8::Handle<v8::Context> v8_context, 226 v8::Handle<v8::Context> v8_context,
226 const std::string& api); 227 const std::string& api);
227 228
228 // Determines whether |frame| is loading a platform app resource URL. (this 229 // Determines whether |frame| is loading a platform app resource URL. (this
229 // evaluates to true for iframes in platform apps and sandboxed resources that 230 // evaluates to true for iframes in platform apps and sandboxed resources that
230 // are not in the same origin). 231 // are not in the same origin).
231 bool IsWithinPlatformApp(const WebKit::WebFrame* frame); 232 bool IsWithinPlatformApp(const WebKit::WebFrame* frame);
232 233
234 bool IsSandboxedPage(const GURL& url) const;
235
233 // Returns the Feature::Context type of context for a JavaScript context. 236 // Returns the Feature::Context type of context for a JavaScript context.
234 Feature::Context ClassifyJavaScriptContext(const std::string& extension_id, 237 Feature::Context ClassifyJavaScriptContext(
235 int extension_group, 238 const std::string& extension_id,
236 const ExtensionURLInfo& url_info); 239 int extension_group,
240 const GURL& url,
241 const WebKit::WebSecurityOrigin& origin);
237 242
238 // Gets |field| from |object| or creates it as an empty object if it doesn't 243 // Gets |field| from |object| or creates it as an empty object if it doesn't
239 // exist. 244 // exist.
240 v8::Handle<v8::Object> GetOrCreateObject(v8::Handle<v8::Object> object, 245 v8::Handle<v8::Object> GetOrCreateObject(v8::Handle<v8::Object> object,
241 const std::string& field); 246 const std::string& field);
242 247
243 // True if this renderer is running extensions. 248 // True if this renderer is running extensions.
244 bool is_extension_process_; 249 bool is_extension_process_;
245 250
246 // Contains all loaded extensions. This is essentially the renderer 251 // Contains all loaded extensions. This is essentially the renderer
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // The platforms system font family and size; 299 // The platforms system font family and size;
295 std::string system_font_family_; 300 std::string system_font_family_;
296 std::string system_font_size_; 301 std::string system_font_size_;
297 302
298 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 303 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
299 }; 304 };
300 305
301 } // namespace extensions 306 } // namespace extensions
302 307
303 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ 308 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/app_bindings.cc ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698