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

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

Issue 2628053003: Remove extension group from DOMWrapperWorld. (Closed)
Patch Set: Fix GCCallbackTest Created 3 years, 11 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
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/extension_frame_helper.h » ('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 #include "extensions/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 bool is_active = 309 bool is_active =
310 active_extension_ids_.find(extension_id) != active_extension_ids_.end(); 310 active_extension_ids_.find(extension_id) != active_extension_ids_.end();
311 if (is_active) 311 if (is_active)
312 CHECK(RendererExtensionRegistry::Get()->Contains(extension_id)); 312 CHECK(RendererExtensionRegistry::Get()->Contains(extension_id));
313 return is_active; 313 return is_active;
314 } 314 }
315 315
316 void Dispatcher::DidCreateScriptContext( 316 void Dispatcher::DidCreateScriptContext(
317 blink::WebLocalFrame* frame, 317 blink::WebLocalFrame* frame,
318 const v8::Local<v8::Context>& v8_context, 318 const v8::Local<v8::Context>& v8_context,
319 int extension_group,
320 int world_id) { 319 int world_id) {
321 const base::TimeTicks start_time = base::TimeTicks::Now(); 320 const base::TimeTicks start_time = base::TimeTicks::Now();
322 321
323 ScriptContext* context = script_context_set_->Register( 322 ScriptContext* context =
324 frame, v8_context, extension_group, world_id); 323 script_context_set_->Register(frame, v8_context, world_id);
325 324
326 // Initialize origin permissions for content scripts, which can't be 325 // Initialize origin permissions for content scripts, which can't be
327 // initialized in |OnActivateExtension|. 326 // initialized in |OnActivateExtension|.
328 if (context->context_type() == Feature::CONTENT_SCRIPT_CONTEXT) 327 if (context->context_type() == Feature::CONTENT_SCRIPT_CONTEXT)
329 InitOriginPermissions(context->extension()); 328 InitOriginPermissions(context->extension());
330 329
331 { 330 {
332 std::unique_ptr<ModuleSystem> module_system( 331 std::unique_ptr<ModuleSystem> module_system(
333 new ModuleSystem(context, &source_map_)); 332 new ModuleSystem(context, &source_map_));
334 context->set_module_system(std::move(module_system)); 333 context->set_module_system(std::move(module_system));
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 // The "guestViewDeny" module must always be loaded last. It registers 1455 // The "guestViewDeny" module must always be loaded last. It registers
1457 // error-providing custom elements for the GuestView types that are not 1456 // error-providing custom elements for the GuestView types that are not
1458 // available, and thus all of those types must have been checked and loaded 1457 // available, and thus all of those types must have been checked and loaded
1459 // (or not loaded) beforehand. 1458 // (or not loaded) beforehand.
1460 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1459 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1461 module_system->Require("guestViewDeny"); 1460 module_system->Require("guestViewDeny");
1462 } 1461 }
1463 } 1462 }
1464 1463
1465 } // namespace extensions 1464 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/extension_frame_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698