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

Side by Side Diff: content/renderer/render_frame_impl.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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_browsertest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 // Return if the world_id is not valid. world_id is passed as a plain int 1989 // Return if the world_id is not valid. world_id is passed as a plain int
1990 // over IPC and needs to be verified here, in the IPC endpoint. 1990 // over IPC and needs to be verified here, in the IPC endpoint.
1991 NOTREACHED(); 1991 NOTREACHED();
1992 return; 1992 return;
1993 } 1993 }
1994 1994
1995 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); 1995 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
1996 WebScriptSource script = WebScriptSource(jscript); 1996 WebScriptSource script = WebScriptSource(jscript);
1997 JavaScriptIsolatedWorldRequest* request = new JavaScriptIsolatedWorldRequest( 1997 JavaScriptIsolatedWorldRequest* request = new JavaScriptIsolatedWorldRequest(
1998 id, notify_result, routing_id_, weak_factory_.GetWeakPtr()); 1998 id, notify_result, routing_id_, weak_factory_.GetWeakPtr());
1999 frame_->requestExecuteScriptInIsolatedWorld(world_id, &script, 1, 0, false, 1999 frame_->requestExecuteScriptInIsolatedWorld(world_id, &script, 1, false,
2000 request); 2000 request);
2001 } 2001 }
2002 2002
2003 RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest( 2003 RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest(
2004 int id, 2004 int id,
2005 bool notify_result, 2005 bool notify_result,
2006 int routing_id, 2006 int routing_id,
2007 base::WeakPtr<RenderFrameImpl> render_frame_impl) 2007 base::WeakPtr<RenderFrameImpl> render_frame_impl)
2008 : id_(id), 2008 : id_(id),
2009 notify_result_(notify_result), 2009 notify_result_(notify_result),
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
4451 } 4451 }
4452 4452
4453 void RenderFrameImpl::didObserveLoadingBehavior( 4453 void RenderFrameImpl::didObserveLoadingBehavior(
4454 blink::WebLoadingBehaviorFlag behavior) { 4454 blink::WebLoadingBehaviorFlag behavior) {
4455 for (auto& observer : observers_) 4455 for (auto& observer : observers_)
4456 observer.DidObserveLoadingBehavior(behavior); 4456 observer.DidObserveLoadingBehavior(behavior);
4457 } 4457 }
4458 4458
4459 void RenderFrameImpl::didCreateScriptContext(blink::WebLocalFrame* frame, 4459 void RenderFrameImpl::didCreateScriptContext(blink::WebLocalFrame* frame,
4460 v8::Local<v8::Context> context, 4460 v8::Local<v8::Context> context,
4461 int extension_group,
4462 int world_id) { 4461 int world_id) {
4463 DCHECK_EQ(frame_, frame); 4462 DCHECK_EQ(frame_, frame);
4464 4463
4465 for (auto& observer : observers_) 4464 for (auto& observer : observers_)
4466 observer.DidCreateScriptContext(context, extension_group, world_id); 4465 observer.DidCreateScriptContext(context, world_id);
4467 } 4466 }
4468 4467
4469 void RenderFrameImpl::willReleaseScriptContext(blink::WebLocalFrame* frame, 4468 void RenderFrameImpl::willReleaseScriptContext(blink::WebLocalFrame* frame,
4470 v8::Local<v8::Context> context, 4469 v8::Local<v8::Context> context,
4471 int world_id) { 4470 int world_id) {
4472 DCHECK_EQ(frame_, frame); 4471 DCHECK_EQ(frame_, frame);
4473 4472
4474 for (auto& observer : observers_) 4473 for (auto& observer : observers_)
4475 observer.WillReleaseScriptContext(context, world_id); 4474 observer.WillReleaseScriptContext(context, world_id);
4476 } 4475 }
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
6795 // event target. Potentially a Pepper plugin will receive the event. 6794 // event target. Potentially a Pepper plugin will receive the event.
6796 // In order to tell whether a plugin gets the last mouse event and which it 6795 // In order to tell whether a plugin gets the last mouse event and which it
6797 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6796 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6798 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6797 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6799 // |pepper_last_mouse_event_target_|. 6798 // |pepper_last_mouse_event_target_|.
6800 pepper_last_mouse_event_target_ = nullptr; 6799 pepper_last_mouse_event_target_ = nullptr;
6801 #endif 6800 #endif
6802 } 6801 }
6803 6802
6804 } // namespace content 6803 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698