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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: Created 3 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 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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 // Return if the world_id is not valid. world_id is passed as a plain int 1969 // Return if the world_id is not valid. world_id is passed as a plain int
1970 // over IPC and needs to be verified here, in the IPC endpoint. 1970 // over IPC and needs to be verified here, in the IPC endpoint.
1971 NOTREACHED(); 1971 NOTREACHED();
1972 return; 1972 return;
1973 } 1973 }
1974 1974
1975 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); 1975 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
1976 WebScriptSource script = WebScriptSource(WebString::fromUTF16(jscript)); 1976 WebScriptSource script = WebScriptSource(WebString::fromUTF16(jscript));
1977 JavaScriptIsolatedWorldRequest* request = new JavaScriptIsolatedWorldRequest( 1977 JavaScriptIsolatedWorldRequest* request = new JavaScriptIsolatedWorldRequest(
1978 id, notify_result, routing_id_, weak_factory_.GetWeakPtr()); 1978 id, notify_result, routing_id_, weak_factory_.GetWeakPtr());
1979 frame_->requestExecuteScriptInIsolatedWorld(world_id, &script, 1, false, 1979 frame_->requestExecuteScriptInIsolatedWorld(
1980 request); 1980 world_id, &script, 1, false, WebLocalFrame::Synchronous, request);
1981 } 1981 }
1982 1982
1983 RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest( 1983 RenderFrameImpl::JavaScriptIsolatedWorldRequest::JavaScriptIsolatedWorldRequest(
1984 int id, 1984 int id,
1985 bool notify_result, 1985 bool notify_result,
1986 int routing_id, 1986 int routing_id,
1987 base::WeakPtr<RenderFrameImpl> render_frame_impl) 1987 base::WeakPtr<RenderFrameImpl> render_frame_impl)
1988 : id_(id), 1988 : id_(id),
1989 notify_result_(notify_result), 1989 notify_result_(notify_result),
1990 routing_id_(routing_id), 1990 routing_id_(routing_id),
(...skipping 4834 matching lines...) Expand 10 before | Expand all | Expand 10 after
6825 // event target. Potentially a Pepper plugin will receive the event. 6825 // event target. Potentially a Pepper plugin will receive the event.
6826 // In order to tell whether a plugin gets the last mouse event and which it 6826 // In order to tell whether a plugin gets the last mouse event and which it
6827 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6827 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6828 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6828 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6829 // |pepper_last_mouse_event_target_|. 6829 // |pepper_last_mouse_event_target_|.
6830 pepper_last_mouse_event_target_ = nullptr; 6830 pepper_last_mouse_event_target_ = nullptr;
6831 #endif 6831 #endif
6832 } 6832 }
6833 6833
6834 } // namespace content 6834 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698