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

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

Issue 1360123006: Introduce RenderFrame::IsMainFrame and clean up a few things. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed use-after-free. Created 5 years, 2 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_frame_impl_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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 *opener_view_routing_id = opener_frame->render_view()->GetRoutingID(); 673 *opener_view_routing_id = opener_frame->render_view()->GetRoutingID();
674 return opener_frame->GetWebFrame(); 674 return opener_frame->GetWebFrame();
675 } 675 }
676 676
677 return nullptr; 677 return nullptr;
678 } 678 }
679 679
680 // RenderFrameImpl ---------------------------------------------------------- 680 // RenderFrameImpl ----------------------------------------------------------
681 RenderFrameImpl::RenderFrameImpl(const CreateParams& params) 681 RenderFrameImpl::RenderFrameImpl(const CreateParams& params)
682 : frame_(NULL), 682 : frame_(NULL),
683 is_subframe_(false), 683 is_main_frame_(true),
684 is_local_root_(false), 684 is_local_root_(false),
685 render_view_(params.render_view->AsWeakPtr()), 685 render_view_(params.render_view->AsWeakPtr()),
686 routing_id_(params.routing_id), 686 routing_id_(params.routing_id),
687 is_swapped_out_(false), 687 is_swapped_out_(false),
688 render_frame_proxy_(NULL), 688 render_frame_proxy_(NULL),
689 is_detaching_(false), 689 is_detaching_(false),
690 proxy_routing_id_(MSG_ROUTING_NONE), 690 proxy_routing_id_(MSG_ROUTING_NONE),
691 #if defined(ENABLE_PLUGINS) 691 #if defined(ENABLE_PLUGINS)
692 plugin_power_saver_helper_(nullptr), 692 plugin_power_saver_helper_(nullptr),
693 #endif 693 #endif
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); 746 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone());
747 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct()); 747 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct());
748 748
749 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_); 749 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_);
750 750
751 #if defined(VIDEO_HOLE) 751 #if defined(VIDEO_HOLE)
752 if (contains_media_player_) 752 if (contains_media_player_)
753 render_view_->UnregisterVideoHoleFrame(this); 753 render_view_->UnregisterVideoHoleFrame(this);
754 #endif 754 #endif
755 755
756 if (!is_subframe_) { 756 if (is_main_frame_) {
757 // When using swapped out frames, RenderFrameProxy is owned by 757 // When using swapped out frames, RenderFrameProxy is owned by
758 // RenderFrameImpl in the case it is the main frame. Ensure it is deleted 758 // RenderFrameImpl in the case it is the main frame. Ensure it is deleted
759 // along with this object. 759 // along with this object.
760 if (render_frame_proxy_ && 760 if (render_frame_proxy_ &&
761 !SiteIsolationPolicy::IsSwappedOutStateForbidden()) { 761 !SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
762 // The following method calls back into this object and clears 762 // The following method calls back into this object and clears
763 // |render_frame_proxy_|. 763 // |render_frame_proxy_|.
764 render_frame_proxy_->frameDetached( 764 render_frame_proxy_->frameDetached(
765 blink::WebRemoteFrameClient::DetachType::Remove); 765 blink::WebRemoteFrameClient::DetachType::Remove);
766 } 766 }
(...skipping 14 matching lines...) Expand all
781 DCHECK(!frame_); 781 DCHECK(!frame_);
782 782
783 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( 783 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert(
784 std::make_pair(web_frame, this)); 784 std::make_pair(web_frame, this));
785 CHECK(result.second) << "Inserting a duplicate item."; 785 CHECK(result.second) << "Inserting a duplicate item.";
786 786
787 frame_ = web_frame; 787 frame_ = web_frame;
788 } 788 }
789 789
790 void RenderFrameImpl::Initialize() { 790 void RenderFrameImpl::Initialize() {
791 is_subframe_ = !!frame_->parent(); 791 is_main_frame_ = !frame_->parent();
792 is_local_root_ = !frame_->parent() || frame_->parent()->isWebRemoteFrame(); 792 is_local_root_ = is_main_frame_ || frame_->parent()->isWebRemoteFrame();
793 793
794 bool is_tracing = false; 794 bool is_tracing = false;
795 TRACE_EVENT_CATEGORY_GROUP_ENABLED("navigation", &is_tracing); 795 TRACE_EVENT_CATEGORY_GROUP_ENABLED("navigation", &is_tracing);
796 if (is_tracing) { 796 if (is_tracing) {
797 int parent_id = MSG_ROUTING_NONE; 797 int parent_id = MSG_ROUTING_NONE;
798 if (is_subframe_) { 798 if (!is_main_frame_) {
799 if (frame_->parent()->isWebRemoteFrame()) { 799 if (frame_->parent()->isWebRemoteFrame()) {
800 RenderFrameProxy* parent_proxy = RenderFrameProxy::FromWebFrame( 800 RenderFrameProxy* parent_proxy = RenderFrameProxy::FromWebFrame(
801 frame_->parent()); 801 frame_->parent());
802 if (parent_proxy) 802 if (parent_proxy)
803 parent_id = parent_proxy->routing_id(); 803 parent_id = parent_proxy->routing_id();
804 } else { 804 } else {
805 RenderFrameImpl* parent_frame = RenderFrameImpl::FromWebFrame( 805 RenderFrameImpl* parent_frame = RenderFrameImpl::FromWebFrame(
806 frame_->parent()); 806 frame_->parent());
807 if (parent_frame) 807 if (parent_frame)
808 parent_id = parent_frame->GetRoutingID(); 808 parent_id = parent_frame->GetRoutingID();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 } 1201 }
1202 1202
1203 void RenderFrameImpl::OnSwapOut( 1203 void RenderFrameImpl::OnSwapOut(
1204 int proxy_routing_id, 1204 int proxy_routing_id,
1205 bool is_loading, 1205 bool is_loading,
1206 const FrameReplicationState& replicated_frame_state) { 1206 const FrameReplicationState& replicated_frame_state) {
1207 TRACE_EVENT1("navigation", "RenderFrameImpl::OnSwapOut", "id", routing_id_); 1207 TRACE_EVENT1("navigation", "RenderFrameImpl::OnSwapOut", "id", routing_id_);
1208 RenderFrameProxy* proxy = NULL; 1208 RenderFrameProxy* proxy = NULL;
1209 bool swapped_out_forbidden = 1209 bool swapped_out_forbidden =
1210 SiteIsolationPolicy::IsSwappedOutStateForbidden(); 1210 SiteIsolationPolicy::IsSwappedOutStateForbidden();
1211 bool is_main_frame = !frame_->parent();
1212 1211
1213 // This codepath should only be hit for subframes when in --site-per-process. 1212 // This codepath should only be hit for subframes when in --site-per-process.
1214 CHECK_IMPLIES(!is_main_frame, 1213 CHECK_IMPLIES(!is_main_frame_,
1215 SiteIsolationPolicy::AreCrossProcessFramesPossible()); 1214 SiteIsolationPolicy::AreCrossProcessFramesPossible());
1216 1215
1217 // Only run unload if we're not swapped out yet, but send the ack either way. 1216 // Only run unload if we're not swapped out yet, but send the ack either way.
1218 if (!is_swapped_out_) { 1217 if (!is_swapped_out_) {
1219 // Swap this RenderFrame out so the frame can navigate to a page rendered by 1218 // Swap this RenderFrame out so the frame can navigate to a page rendered by
1220 // a different process. This involves running the unload handler and 1219 // a different process. This involves running the unload handler and
1221 // clearing the page. We also allow this process to exit if there are no 1220 // clearing the page. We also allow this process to exit if there are no
1222 // other active RenderFrames in it. 1221 // other active RenderFrames in it.
1223 1222
1224 // Send an UpdateState message before we get swapped out. 1223 // Send an UpdateState message before we get swapped out.
1225 render_view_->SendUpdateState(); 1224 render_view_->SendUpdateState();
1226 1225
1227 // If we need a proxy to replace this, create it now so its routing id is 1226 // If we need a proxy to replace this, create it now so its routing id is
1228 // registered for receiving IPC messages. 1227 // registered for receiving IPC messages.
1229 if (proxy_routing_id != MSG_ROUTING_NONE) { 1228 if (proxy_routing_id != MSG_ROUTING_NONE) {
1230 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( 1229 proxy = RenderFrameProxy::CreateProxyToReplaceFrame(
1231 this, proxy_routing_id, replicated_frame_state.scope); 1230 this, proxy_routing_id, replicated_frame_state.scope);
1232 } 1231 }
1233 1232
1234 // Synchronously run the unload handler before sending the ACK. 1233 // Synchronously run the unload handler before sending the ACK.
1235 // TODO(creis): Call dispatchUnloadEvent unconditionally here to support 1234 // TODO(creis): Call dispatchUnloadEvent unconditionally here to support
1236 // unload on subframes as well. 1235 // unload on subframes as well.
1237 if (is_main_frame) 1236 if (is_main_frame_)
1238 frame_->dispatchUnloadEvent(); 1237 frame_->dispatchUnloadEvent();
1239 1238
1240 // Swap out and stop sending any IPC messages that are not ACKs. 1239 // Swap out and stop sending any IPC messages that are not ACKs.
1241 if (is_main_frame) 1240 if (is_main_frame_)
1242 render_view_->SetSwappedOut(true); 1241 render_view_->SetSwappedOut(true);
1243 is_swapped_out_ = true; 1242 is_swapped_out_ = true;
1244 1243
1245 // Set the proxy here, since OnStop() below could cause an onload event 1244 // Set the proxy here, since OnStop() below could cause an onload event
1246 // handler to execute, which could trigger code such as 1245 // handler to execute, which could trigger code such as
1247 // willCheckAndDispatchMessageEvent() that needs the proxy. 1246 // willCheckAndDispatchMessageEvent() that needs the proxy.
1248 if (proxy) 1247 if (proxy)
1249 set_render_frame_proxy(proxy); 1248 set_render_frame_proxy(proxy);
1250 1249
1251 // Now that we're swapped out and filtering IPC messages, stop loading to 1250 // Now that we're swapped out and filtering IPC messages, stop loading to
1252 // ensure that no other in-progress navigation continues. We do this here 1251 // ensure that no other in-progress navigation continues. We do this here
1253 // to avoid sending a DidStopLoading message to the browser process. 1252 // to avoid sending a DidStopLoading message to the browser process.
1254 // TODO(creis): Should we be stopping all frames here and using 1253 // TODO(creis): Should we be stopping all frames here and using
1255 // StopAltErrorPageFetcher with RenderView::OnStop, or just stopping this 1254 // StopAltErrorPageFetcher with RenderView::OnStop, or just stopping this
1256 // frame? 1255 // frame?
1257 if (!swapped_out_forbidden) 1256 if (!swapped_out_forbidden)
1258 OnStop(); 1257 OnStop();
1259 1258
1260 // Transfer settings such as initial drawing parameters to the remote frame, 1259 // Transfer settings such as initial drawing parameters to the remote frame,
1261 // if one is created, that will replace this frame. 1260 // if one is created, that will replace this frame.
1262 if (!is_main_frame && proxy) 1261 if (!is_main_frame_ && proxy)
1263 proxy->web_frame()->initializeFromFrame(frame_); 1262 proxy->web_frame()->initializeFromFrame(frame_);
1264 1263
1265 // Replace the page with a blank dummy URL. The unload handler will not be 1264 // Replace the page with a blank dummy URL. The unload handler will not be
1266 // run a second time, thanks to a check in FrameLoader::stopLoading. 1265 // run a second time, thanks to a check in FrameLoader::stopLoading.
1267 // TODO(creis): Need to add a better way to do this that avoids running the 1266 // TODO(creis): Need to add a better way to do this that avoids running the
1268 // beforeunload handler. For now, we just run it a second time silently. 1267 // beforeunload handler. For now, we just run it a second time silently.
1269 if (!swapped_out_forbidden) 1268 if (!swapped_out_forbidden)
1270 NavigateToSwappedOutURL(); 1269 NavigateToSwappedOutURL();
1271 1270
1272 // Let WebKit know that this view is hidden so it can drop resources and 1271 // Let WebKit know that this view is hidden so it can drop resources and
1273 // stop compositing. 1272 // stop compositing.
1274 // TODO(creis): Support this for subframes as well. 1273 // TODO(creis): Support this for subframes as well.
1275 if (is_main_frame) { 1274 if (is_main_frame_) {
1276 render_view_->webview()->setVisibilityState( 1275 render_view_->webview()->setVisibilityState(
1277 blink::WebPageVisibilityStateHidden, false); 1276 blink::WebPageVisibilityStateHidden, false);
1278 } 1277 }
1279 } 1278 }
1280 1279
1281 // It is now safe to show modal dialogs again. 1280 // It is now safe to show modal dialogs again.
1282 // TODO(creis): Deal with modal dialogs from subframes. 1281 // TODO(creis): Deal with modal dialogs from subframes.
1283 if (is_main_frame) 1282 if (is_main_frame_)
1284 render_view_->suppress_dialogs_until_swap_out_ = false; 1283 render_view_->suppress_dialogs_until_swap_out_ = false;
1285 1284
1286 Send(new FrameHostMsg_SwapOut_ACK(routing_id_)); 1285 Send(new FrameHostMsg_SwapOut_ACK(routing_id_));
1287 1286
1288 RenderViewImpl* render_view = render_view_.get(); 1287 RenderViewImpl* render_view = render_view_.get();
1288 bool is_main_frame = is_main_frame_;
1289 1289
1290 // Now that all of the cleanup is complete and the browser side is notified, 1290 // Now that all of the cleanup is complete and the browser side is notified,
1291 // start using the RenderFrameProxy, if one is created. 1291 // start using the RenderFrameProxy, if one is created.
1292 if (proxy && swapped_out_forbidden) { 1292 if (proxy && swapped_out_forbidden) {
1293 frame_->swap(proxy->web_frame()); 1293 frame_->swap(proxy->web_frame());
1294 1294
1295 if (is_loading) 1295 if (is_loading)
1296 proxy->OnDidStartLoading(); 1296 proxy->OnDidStartLoading();
1297 } 1297 }
1298 1298
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2294 // containing RenderViewHost (so that they have the same lifetime), so only 2294 // containing RenderViewHost (so that they have the same lifetime), so only
2295 // removal from the map is needed and no deletion. 2295 // removal from the map is needed and no deletion.
2296 FrameMap::iterator it = g_frame_map.Get().find(frame); 2296 FrameMap::iterator it = g_frame_map.Get().find(frame);
2297 CHECK(it != g_frame_map.Get().end()); 2297 CHECK(it != g_frame_map.Get().end());
2298 CHECK_EQ(it->second, this); 2298 CHECK_EQ(it->second, this);
2299 g_frame_map.Get().erase(it); 2299 g_frame_map.Get().erase(it);
2300 2300
2301 // Only remove the frame from the renderer's frame tree if the frame is 2301 // Only remove the frame from the renderer's frame tree if the frame is
2302 // being detached for removal. In the case of a swap, the frame needs to 2302 // being detached for removal. In the case of a swap, the frame needs to
2303 // remain in the tree so WebFrame::swap() can replace it with the new frame. 2303 // remain in the tree so WebFrame::swap() can replace it with the new frame.
2304 if (is_subframe_ && type == DetachType::Remove) 2304 if (!is_main_frame_ && type == DetachType::Remove)
2305 frame->parent()->removeChild(frame); 2305 frame->parent()->removeChild(frame);
2306 2306
2307 // |frame| is invalid after here. Be sure to clear frame_ as well, since this 2307 // |frame| is invalid after here. Be sure to clear frame_ as well, since this
2308 // object may not be deleted immediately and other methods may try to access 2308 // object may not be deleted immediately and other methods may try to access
2309 // it. 2309 // it.
2310 frame->close(); 2310 frame->close();
2311 frame_ = nullptr; 2311 frame_ = nullptr;
2312 2312
2313 delete this; 2313 delete this;
2314 // Object is invalid after this point. 2314 // Object is invalid after this point.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 if (proxy_routing_id_ != MSG_ROUTING_NONE) { 2719 if (proxy_routing_id_ != MSG_ROUTING_NONE) {
2720 RenderFrameProxy* proxy = 2720 RenderFrameProxy* proxy =
2721 RenderFrameProxy::FromRoutingID(proxy_routing_id_); 2721 RenderFrameProxy::FromRoutingID(proxy_routing_id_);
2722 CHECK(proxy); 2722 CHECK(proxy);
2723 proxy->web_frame()->swap(frame_); 2723 proxy->web_frame()->swap(frame_);
2724 proxy_routing_id_ = MSG_ROUTING_NONE; 2724 proxy_routing_id_ = MSG_ROUTING_NONE;
2725 2725
2726 // If this is the main frame going from a remote frame to a local frame, 2726 // If this is the main frame going from a remote frame to a local frame,
2727 // it needs to set RenderViewImpl's pointer for the main frame to itself 2727 // it needs to set RenderViewImpl's pointer for the main frame to itself
2728 // and ensure RenderWidget is no longer in swapped out mode. 2728 // and ensure RenderWidget is no longer in swapped out mode.
2729 if (!is_subframe_) { 2729 if (is_main_frame_) {
2730 CHECK(!render_view_->main_render_frame_); 2730 CHECK(!render_view_->main_render_frame_);
2731 render_view_->main_render_frame_ = this; 2731 render_view_->main_render_frame_ = this;
2732 if (render_view_->is_swapped_out()) 2732 if (render_view_->is_swapped_out())
2733 render_view_->SetSwappedOut(false); 2733 render_view_->SetSwappedOut(false);
2734 } 2734 }
2735 } 2735 }
2736 2736
2737 // When we perform a new navigation, we need to update the last committed 2737 // When we perform a new navigation, we need to update the last committed
2738 // session history entry with state for the page we are leaving. Do this 2738 // session history entry with state for the page we are leaving. Do this
2739 // before updating the HistoryController state. 2739 // before updating the HistoryController state.
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
3923 static_cast<blink::WebFrameWidget*>(render_widget_->webwidget())-> 3923 static_cast<blink::WebFrameWidget*>(render_widget_->webwidget())->
3924 setVisibilityState(blink::WebPageVisibilityStateVisible, false); 3924 setVisibilityState(blink::WebPageVisibilityStateVisible, false);
3925 } 3925 }
3926 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown()); 3926 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown());
3927 } 3927 }
3928 3928
3929 void RenderFrameImpl::WidgetWillClose() { 3929 void RenderFrameImpl::WidgetWillClose() {
3930 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose()); 3930 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose());
3931 } 3931 }
3932 3932
3933 bool RenderFrameImpl::IsMainFrame() {
3934 return is_main_frame_;
3935 }
3936
3933 bool RenderFrameImpl::IsHidden() { 3937 bool RenderFrameImpl::IsHidden() {
3934 return GetRenderWidget()->is_hidden(); 3938 return GetRenderWidget()->is_hidden();
3935 } 3939 }
3936 3940
3937 // Tell the embedding application that the URL of the active page has changed. 3941 // Tell the embedding application that the URL of the active page has changed.
3938 void RenderFrameImpl::SendDidCommitProvisionalLoad( 3942 void RenderFrameImpl::SendDidCommitProvisionalLoad(
3939 blink::WebFrame* frame, 3943 blink::WebFrame* frame,
3940 blink::WebHistoryCommitType commit_type, 3944 blink::WebHistoryCommitType commit_type,
3941 const blink::WebHistoryItem& item) { 3945 const blink::WebHistoryItem& item) {
3942 DCHECK(!frame_ || frame_ == frame); 3946 DCHECK(!frame_ || frame_ == frame);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4244 common_params.url == GetLoadingUrl(); 4248 common_params.url == GetLoadingUrl();
4245 LoadNavigationErrorPage(failed_request, error, replace); 4249 LoadNavigationErrorPage(failed_request, error, replace);
4246 } 4250 }
4247 4251
4248 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( 4252 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
4249 RenderFrame* render_frame, 4253 RenderFrame* render_frame,
4250 const NavigationPolicyInfo& info) { 4254 const NavigationPolicyInfo& info) {
4251 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame, 4255 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame,
4252 info.urlRequest)); 4256 info.urlRequest));
4253 4257
4254 // TODO(nick): Is consulting |is_subframe_| here correct? 4258 // TODO(nick): Is consulting |is_main_frame| here correct?
4255 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && is_subframe_) { 4259 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && !is_main_frame_) {
4256 // There's no reason to ignore navigations on subframes, since the swap out 4260 // There's no reason to ignore navigations on subframes, since the swap out
4257 // logic no longer applies. 4261 // logic no longer applies.
4258 } else { 4262 } else {
4259 if (is_swapped_out_) { 4263 if (is_swapped_out_) {
4260 if (info.urlRequest.url() != GURL(kSwappedOutURL)) { 4264 if (info.urlRequest.url() != GURL(kSwappedOutURL)) {
4261 // Targeted links may try to navigate a swapped out frame. Allow the 4265 // Targeted links may try to navigate a swapped out frame. Allow the
4262 // browser process to navigate the tab instead. Note that it is also 4266 // browser process to navigate the tab instead. Note that it is also
4263 // possible for non-targeted navigations (from this view) to arrive 4267 // possible for non-targeted navigations (from this view) to arrive
4264 // here just after we are swapped out. It's ok to send them to the 4268 // here just after we are swapped out. It's ok to send them to the
4265 // browser, as long as they're for the top level frame. 4269 // browser, as long as they're for the top level frame.
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5138 mojo::ServiceProviderPtr service_provider; 5142 mojo::ServiceProviderPtr service_provider;
5139 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5143 mojo::URLRequestPtr request(mojo::URLRequest::New());
5140 request->url = mojo::String::From(url); 5144 request->url = mojo::String::From(url);
5141 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5145 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5142 nullptr, nullptr, 5146 nullptr, nullptr,
5143 base::Bind(&OnGotContentHandlerID)); 5147 base::Bind(&OnGotContentHandlerID));
5144 return service_provider.Pass(); 5148 return service_provider.Pass();
5145 } 5149 }
5146 5150
5147 } // namespace content 5151 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698