OLD | NEW |
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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 // passed back to the browser in the DidCommitProvisionalLoad and the | 450 // passed back to the browser in the DidCommitProvisionalLoad and the |
451 // DocumentLoadComplete IPCs. | 451 // DocumentLoadComplete IPCs. |
452 base::TimeDelta ui_timestamp = common_params.ui_timestamp - base::TimeTicks(); | 452 base::TimeDelta ui_timestamp = common_params.ui_timestamp - base::TimeTicks(); |
453 request.setUiStartTime(ui_timestamp.InSecondsF()); | 453 request.setUiStartTime(ui_timestamp.InSecondsF()); |
454 request.setInputPerfMetricReportPolicy( | 454 request.setInputPerfMetricReportPolicy( |
455 static_cast<WebURLRequest::InputToLoadPerfMetricReportPolicy>( | 455 static_cast<WebURLRequest::InputToLoadPerfMetricReportPolicy>( |
456 common_params.report_type)); | 456 common_params.report_type)); |
457 return request; | 457 return request; |
458 } | 458 } |
459 | 459 |
460 void UpdateFrameNavigationTiming(WebFrame* frame, | 460 // Sanitizes the navigation_start timestamp for browser-initiated navigations, |
461 base::TimeTicks browser_navigation_start, | 461 // where the browser possibly has a better notion of start time than the |
462 base::TimeTicks renderer_navigation_start) { | 462 // renderer. In the case of cross-process navigations, this carries over the |
463 // The browser provides the navigation_start time to bootstrap the | 463 // time of finishing the onbeforeunload handler of the previous page. |
464 // Navigation Timing information for the browser-initiated navigations. In | 464 // TimeTicks is sometimes not monotonic across processes, and because |
465 // case of cross-process navigations, this carries over the time of | 465 // |browser_navigation_start| is likely before this process existed, |
466 // finishing the onbeforeunload handler of the previous page. | 466 // InterProcessTimeTicksConverter won't help. The timestamp is sanitized by |
| 467 // clamping it to renderer_navigation_start, initialized earlier in the call |
| 468 // stack. |
| 469 base::TimeTicks SanitizeNavigationTiming( |
| 470 blink::WebFrameLoadType load_type, |
| 471 const base::TimeTicks& browser_navigation_start, |
| 472 const base::TimeTicks& renderer_navigation_start) { |
| 473 if (load_type != blink::WebFrameLoadType::Standard) |
| 474 return base::TimeTicks(); |
467 DCHECK(!browser_navigation_start.is_null()); | 475 DCHECK(!browser_navigation_start.is_null()); |
468 if (frame->provisionalDataSource()) { | 476 base::TimeTicks navigation_start = |
469 // |browser_navigation_start| is likely before this process existed, so we | 477 std::min(browser_navigation_start, renderer_navigation_start); |
470 // can't use InterProcessTimeTicksConverter. We need at least to ensure | 478 // TODO(csharrison) Investigate how big a problem the cross process |
471 // that the browser-side navigation start we set is not later than the one | 479 // monotonicity really is and on what platforms. Log UMA for: |
472 // on the renderer side. | 480 // |renderer_navigation_start - browser_navigation_start| |
473 base::TimeTicks navigation_start = std::min( | 481 return navigation_start; |
474 browser_navigation_start, renderer_navigation_start); | |
475 double navigation_start_seconds = | |
476 (navigation_start - base::TimeTicks()).InSecondsF(); | |
477 frame->provisionalDataSource()->setNavigationStartTime( | |
478 navigation_start_seconds); | |
479 // TODO(clamy): We need to provide additional timing values for the | |
480 // Navigation Timing API to work with browser-side navigations. | |
481 } | |
482 } | 482 } |
483 | 483 |
484 // PlzNavigate | 484 // PlzNavigate |
485 CommonNavigationParams MakeCommonNavigationParams( | 485 CommonNavigationParams MakeCommonNavigationParams( |
486 blink::WebURLRequest* request, | 486 blink::WebURLRequest* request, |
487 bool should_replace_current_entry) { | 487 bool should_replace_current_entry) { |
488 const RequestExtraData kEmptyData; | 488 const RequestExtraData kEmptyData; |
489 const RequestExtraData* extra_data = | 489 const RequestExtraData* extra_data = |
490 static_cast<RequestExtraData*>(request->extraData()); | 490 static_cast<RequestExtraData*>(request->extraData()); |
491 if (!extra_data) | 491 if (!extra_data) |
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2583 InternalDocumentStateData::FromDocumentState(document_state); | 2583 InternalDocumentStateData::FromDocumentState(document_state); |
2584 InternalDocumentStateData* old_internal_data = | 2584 InternalDocumentStateData* old_internal_data = |
2585 InternalDocumentStateData::FromDocumentState(old_document_state); | 2585 InternalDocumentStateData::FromDocumentState(old_document_state); |
2586 internal_data->set_is_overriding_user_agent( | 2586 internal_data->set_is_overriding_user_agent( |
2587 old_internal_data->is_overriding_user_agent()); | 2587 old_internal_data->is_overriding_user_agent()); |
2588 } | 2588 } |
2589 } | 2589 } |
2590 | 2590 |
2591 // The rest of RenderView assumes that a WebDataSource will always have a | 2591 // The rest of RenderView assumes that a WebDataSource will always have a |
2592 // non-null NavigationState. | 2592 // non-null NavigationState. |
2593 if (content_initiated) { | 2593 UpdateNavigationState(document_state); |
2594 document_state->set_navigation_state( | |
2595 NavigationStateImpl::CreateContentInitiated()); | |
2596 } else { | |
2597 document_state->set_navigation_state(CreateNavigationStateFromPending()); | |
2598 pending_navigation_params_.reset(); | |
2599 } | |
2600 | 2594 |
2601 // DocumentState::referred_by_prefetcher_ is true if we are | 2595 // DocumentState::referred_by_prefetcher_ is true if we are |
2602 // navigating from a page that used prefetching using a link on that | 2596 // navigating from a page that used prefetching using a link on that |
2603 // page. We are early enough in the request process here that we | 2597 // page. We are early enough in the request process here that we |
2604 // can still see the DocumentState of the previous page and set | 2598 // can still see the DocumentState of the previous page and set |
2605 // this value appropriately. | 2599 // this value appropriately. |
2606 // TODO(gavinp): catch the important case of navigation in a new | 2600 // TODO(gavinp): catch the important case of navigation in a new |
2607 // renderer process. | 2601 // renderer process. |
2608 if (webview) { | 2602 if (webview) { |
2609 if (WebFrame* old_frame = webview->mainFrame()) { | 2603 if (WebFrame* old_frame = webview->mainFrame()) { |
(...skipping 29 matching lines...) Expand all Loading... |
2639 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_STALE_OK); | 2633 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_STALE_OK); |
2640 break; | 2634 break; |
2641 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. | 2635 case WebURLRequest::ReturnCacheDataDontLoad: // Don't re-post. |
2642 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); | 2636 document_state->set_load_type(DocumentState::LINK_LOAD_CACHE_ONLY); |
2643 break; | 2637 break; |
2644 default: | 2638 default: |
2645 NOTREACHED(); | 2639 NOTREACHED(); |
2646 } | 2640 } |
2647 } | 2641 } |
2648 | 2642 |
| 2643 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( |
| 2644 document_state->navigation_state()); |
| 2645 |
| 2646 // Set the navigation start time in blink. |
| 2647 base::TimeTicks navigation_start = |
| 2648 navigation_state->common_params().navigation_start; |
| 2649 datasource->setNavigationStartTime( |
| 2650 (navigation_start - base::TimeTicks()).InSecondsF()); |
| 2651 // TODO(clamy) We need to provide additional timing values for the Navigation |
| 2652 // Timing API to work with browser-side navigations. |
| 2653 |
2649 // Create the serviceworker's per-document network observing object if it | 2654 // Create the serviceworker's per-document network observing object if it |
2650 // does not exist (When navigation happens within a page, the provider already | 2655 // does not exist (When navigation happens within a page, the provider already |
2651 // exists). | 2656 // exists). |
2652 if (ServiceWorkerNetworkProvider::FromDocumentState( | 2657 if (ServiceWorkerNetworkProvider::FromDocumentState( |
2653 DocumentState::FromDataSource(datasource))) | 2658 DocumentState::FromDataSource(datasource))) |
2654 return; | 2659 return; |
2655 | 2660 |
2656 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( | |
2657 DocumentState::FromDataSource(datasource)->navigation_state()); | |
2658 | |
2659 ServiceWorkerNetworkProvider::AttachToDocumentState( | 2661 ServiceWorkerNetworkProvider::AttachToDocumentState( |
2660 DocumentState::FromDataSource(datasource), | 2662 DocumentState::FromDataSource(datasource), |
2661 ServiceWorkerNetworkProvider::CreateForNavigation( | 2663 ServiceWorkerNetworkProvider::CreateForNavigation( |
2662 routing_id_, navigation_state->request_params(), | 2664 routing_id_, navigation_state->request_params(), |
2663 frame->effectiveSandboxFlags(), content_initiated)); | 2665 frame->effectiveSandboxFlags(), content_initiated)); |
2664 } | 2666 } |
2665 | 2667 |
2666 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame, | 2668 void RenderFrameImpl::didStartProvisionalLoad(blink::WebLocalFrame* frame, |
2667 double triggering_event_time) { | 2669 double triggering_event_time) { |
2668 DCHECK(!frame_ || frame_ == frame); | 2670 DCHECK(!frame_ || frame_ == frame); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3124 blink::WebHistoryCommitType commit_type) { | 3126 blink::WebHistoryCommitType commit_type) { |
3125 TRACE_EVENT1("navigation", "RenderFrameImpl::didNavigateWithinPage", | 3127 TRACE_EVENT1("navigation", "RenderFrameImpl::didNavigateWithinPage", |
3126 "id", routing_id_); | 3128 "id", routing_id_); |
3127 DCHECK(!frame_ || frame_ == frame); | 3129 DCHECK(!frame_ || frame_ == frame); |
3128 // If this was a reference fragment navigation that we initiated, then we | 3130 // If this was a reference fragment navigation that we initiated, then we |
3129 // could end up having a non-null pending navigation params. We just need to | 3131 // could end up having a non-null pending navigation params. We just need to |
3130 // update the ExtraData on the datasource so that others who read the | 3132 // update the ExtraData on the datasource so that others who read the |
3131 // ExtraData will get the new NavigationState. Similarly, if we did not | 3133 // ExtraData will get the new NavigationState. Similarly, if we did not |
3132 // initiate this navigation, then we need to take care to reset any pre- | 3134 // initiate this navigation, then we need to take care to reset any pre- |
3133 // existing navigation state to a content-initiated navigation state. | 3135 // existing navigation state to a content-initiated navigation state. |
3134 // didCreateDataSource conveniently takes care of this for us. | 3136 // UpdateNavigationState conveniently takes care of this for us. |
3135 didCreateDataSource(frame, frame->dataSource()); | |
3136 | |
3137 DocumentState* document_state = | 3137 DocumentState* document_state = |
3138 DocumentState::FromDataSource(frame->dataSource()); | 3138 DocumentState::FromDataSource(frame->dataSource()); |
| 3139 UpdateNavigationState(document_state); |
3139 static_cast<NavigationStateImpl*>(document_state->navigation_state()) | 3140 static_cast<NavigationStateImpl*>(document_state->navigation_state()) |
3140 ->set_was_within_same_page(true); | 3141 ->set_was_within_same_page(true); |
3141 | 3142 |
3142 didCommitProvisionalLoad(frame, item, commit_type); | 3143 didCommitProvisionalLoad(frame, item, commit_type); |
3143 } | 3144 } |
3144 | 3145 |
3145 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { | 3146 void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) { |
3146 DCHECK(!frame_ || frame_ == frame); | 3147 DCHECK(!frame_ || frame_ == frame); |
3147 // TODO(nasko): Move implementation here. Needed methods: | 3148 // TODO(nasko): Move implementation here. Needed methods: |
3148 // * StartNavStateSyncTimerIfNecessary | 3149 // * StartNavStateSyncTimerIfNecessary |
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4615 } | 4616 } |
4616 | 4617 |
4617 void RenderFrameImpl::NavigateInternal( | 4618 void RenderFrameImpl::NavigateInternal( |
4618 const CommonNavigationParams& common_params, | 4619 const CommonNavigationParams& common_params, |
4619 const StartNavigationParams& start_params, | 4620 const StartNavigationParams& start_params, |
4620 const RequestNavigationParams& request_params, | 4621 const RequestNavigationParams& request_params, |
4621 scoped_ptr<StreamOverrideParameters> stream_params) { | 4622 scoped_ptr<StreamOverrideParameters> stream_params) { |
4622 bool browser_side_navigation = | 4623 bool browser_side_navigation = |
4623 base::CommandLine::ForCurrentProcess()->HasSwitch( | 4624 base::CommandLine::ForCurrentProcess()->HasSwitch( |
4624 switches::kEnableBrowserSideNavigation); | 4625 switches::kEnableBrowserSideNavigation); |
| 4626 |
| 4627 // Lower bound for browser initiated navigation start time. |
| 4628 base::TimeTicks renderer_navigation_start = base::TimeTicks::Now(); |
4625 bool is_reload = IsReload(common_params.navigation_type); | 4629 bool is_reload = IsReload(common_params.navigation_type); |
4626 bool is_history_navigation = request_params.page_state.IsValid(); | 4630 bool is_history_navigation = request_params.page_state.IsValid(); |
4627 WebURLRequest::CachePolicy cache_policy = | 4631 WebURLRequest::CachePolicy cache_policy = |
4628 WebURLRequest::UseProtocolCachePolicy; | 4632 WebURLRequest::UseProtocolCachePolicy; |
4629 RenderFrameImpl::PrepareRenderViewForNavigation( | 4633 RenderFrameImpl::PrepareRenderViewForNavigation( |
4630 common_params.url, request_params, &is_reload, &cache_policy); | 4634 common_params.url, request_params, &is_reload, &cache_policy); |
4631 | 4635 |
4632 GetContentClient()->SetActiveURL(common_params.url); | 4636 GetContentClient()->SetActiveURL(common_params.url); |
4633 | 4637 |
4634 // If this frame isn't in the same process as the main frame, it may naively | 4638 // If this frame isn't in the same process as the main frame, it may naively |
4635 // assume that this is the first navigation in the iframe, but this may not | 4639 // assume that this is the first navigation in the iframe, but this may not |
4636 // actually be the case. Inform the frame's state machine if this frame has | 4640 // actually be the case. Inform the frame's state machine if this frame has |
4637 // already committed other loads. | 4641 // already committed other loads. |
4638 if (request_params.has_committed_real_load && frame_->parent()) | 4642 if (request_params.has_committed_real_load && frame_->parent()) |
4639 frame_->setCommittedFirstRealLoad(); | 4643 frame_->setCommittedFirstRealLoad(); |
4640 | 4644 |
4641 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { | 4645 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { |
4642 // We cannot reload if we do not have any history state. This happens, for | 4646 // We cannot reload if we do not have any history state. This happens, for |
4643 // example, when recovering from a crash. | 4647 // example, when recovering from a crash. |
4644 is_reload = false; | 4648 is_reload = false; |
4645 cache_policy = WebURLRequest::ReloadIgnoringCacheData; | 4649 cache_policy = WebURLRequest::ReloadIgnoringCacheData; |
4646 } | 4650 } |
4647 | 4651 |
4648 pending_navigation_params_.reset( | 4652 pending_navigation_params_.reset( |
4649 new NavigationParams(common_params, start_params, request_params)); | 4653 new NavigationParams(common_params, start_params, request_params)); |
4650 | 4654 |
| 4655 // Unless the load is a WebFrameLoadType::Standard, this should remain |
| 4656 // uninitialized. It will be updated when the load type is determined to be |
| 4657 // Standard, or after the previous document's unload handler has been |
| 4658 // triggered. This occurs in UpdateNavigationState. |
| 4659 // TODO(csharrison) See if we can always use the browser timestamp. |
| 4660 pending_navigation_params_->common_params.navigation_start = |
| 4661 base::TimeTicks(); |
| 4662 |
4651 // Create parameters for a standard navigation. | 4663 // Create parameters for a standard navigation. |
4652 blink::WebFrameLoadType load_type = blink::WebFrameLoadType::Standard; | 4664 blink::WebFrameLoadType load_type = blink::WebFrameLoadType::Standard; |
4653 bool should_load_request = false; | 4665 bool should_load_request = false; |
4654 WebHistoryItem item_for_history_navigation; | 4666 WebHistoryItem item_for_history_navigation; |
4655 WebURLRequest request = CreateURLRequestForNavigation( | 4667 WebURLRequest request = CreateURLRequestForNavigation( |
4656 common_params, stream_params.Pass(), frame_->isViewSourceModeEnabled()); | 4668 common_params, stream_params.Pass(), frame_->isViewSourceModeEnabled()); |
4657 #if defined(OS_ANDROID) | 4669 #if defined(OS_ANDROID) |
4658 request.setHasUserGesture(start_params.has_user_gesture); | 4670 request.setHasUserGesture(start_params.has_user_gesture); |
4659 #endif | 4671 #endif |
4660 | 4672 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4771 request.setHTTPBody(http_body); | 4783 request.setHTTPBody(http_body); |
4772 } | 4784 } |
4773 | 4785 |
4774 // A session history navigation should have been accompanied by state. | 4786 // A session history navigation should have been accompanied by state. |
4775 CHECK_EQ(request_params.page_id, -1); | 4787 CHECK_EQ(request_params.page_id, -1); |
4776 | 4788 |
4777 should_load_request = true; | 4789 should_load_request = true; |
4778 } | 4790 } |
4779 | 4791 |
4780 if (should_load_request) { | 4792 if (should_load_request) { |
4781 // Record this before starting the load. We need a lower bound of this | 4793 // Sanitize navigation start now that we know the load_type. |
4782 // time to sanitize the navigationStart override set below. | 4794 pending_navigation_params_->common_params.navigation_start = |
4783 base::TimeTicks renderer_navigation_start = base::TimeTicks::Now(); | 4795 SanitizeNavigationTiming(load_type, common_params.navigation_start, |
4784 | 4796 renderer_navigation_start); |
4785 // Perform a navigation to a data url if needed. | 4797 // Perform a navigation to a data url if needed. |
4786 if (!common_params.base_url_for_data_url.is_empty() || | 4798 if (!common_params.base_url_for_data_url.is_empty() || |
4787 (browser_side_navigation && | 4799 (browser_side_navigation && |
4788 common_params.url.SchemeIs(url::kDataScheme))) { | 4800 common_params.url.SchemeIs(url::kDataScheme))) { |
4789 LoadDataURL(common_params, frame_); | 4801 LoadDataURL(common_params, frame_); |
4790 } else { | 4802 } else { |
4791 // Load the request. | 4803 // Load the request. |
4792 frame_->toWebLocalFrame()->load(request, load_type, | 4804 frame_->toWebLocalFrame()->load(request, load_type, |
4793 item_for_history_navigation); | 4805 item_for_history_navigation); |
4794 } | 4806 } |
4795 | |
4796 if (load_type == blink::WebFrameLoadType::Standard) { | |
4797 UpdateFrameNavigationTiming(frame_, | |
4798 common_params.navigation_start, | |
4799 renderer_navigation_start); | |
4800 } | |
4801 } | 4807 } |
4802 | 4808 |
4803 // In case LoadRequest failed before didCreateDataSource was called. | 4809 // In case LoadRequest failed before didCreateDataSource was called. |
4804 pending_navigation_params_.reset(); | 4810 pending_navigation_params_.reset(); |
4805 } | 4811 } |
4806 | 4812 |
4807 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, | 4813 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, |
4808 const std::string& encoding_name) { | 4814 const std::string& encoding_name) { |
4809 // Only update main frame's encoding_name. | 4815 // Only update main frame's encoding_name. |
4810 if (!frame->parent()) | 4816 if (!frame->parent()) |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5151 NavigationState* RenderFrameImpl::CreateNavigationStateFromPending() { | 5157 NavigationState* RenderFrameImpl::CreateNavigationStateFromPending() { |
5152 if (IsBrowserInitiated(pending_navigation_params_.get())) { | 5158 if (IsBrowserInitiated(pending_navigation_params_.get())) { |
5153 return NavigationStateImpl::CreateBrowserInitiated( | 5159 return NavigationStateImpl::CreateBrowserInitiated( |
5154 pending_navigation_params_->common_params, | 5160 pending_navigation_params_->common_params, |
5155 pending_navigation_params_->start_params, | 5161 pending_navigation_params_->start_params, |
5156 pending_navigation_params_->request_params); | 5162 pending_navigation_params_->request_params); |
5157 } | 5163 } |
5158 return NavigationStateImpl::CreateContentInitiated(); | 5164 return NavigationStateImpl::CreateContentInitiated(); |
5159 } | 5165 } |
5160 | 5166 |
| 5167 void RenderFrameImpl::UpdateNavigationState(DocumentState* document_state) { |
| 5168 if (pending_navigation_params_) { |
| 5169 // If this is a browser-initiated load that doesn't override |
| 5170 // navigation_start, set it here. |
| 5171 if (pending_navigation_params_->common_params.navigation_start.is_null()) { |
| 5172 pending_navigation_params_->common_params.navigation_start = |
| 5173 base::TimeTicks::Now(); |
| 5174 } |
| 5175 document_state->set_navigation_state(CreateNavigationStateFromPending()); |
| 5176 pending_navigation_params_.reset(); |
| 5177 } else { |
| 5178 document_state->set_navigation_state( |
| 5179 NavigationStateImpl::CreateContentInitiated()); |
| 5180 } |
| 5181 } |
| 5182 |
5161 #if defined(OS_ANDROID) | 5183 #if defined(OS_ANDROID) |
5162 WebMediaPlayer* RenderFrameImpl::CreateAndroidWebMediaPlayer( | 5184 WebMediaPlayer* RenderFrameImpl::CreateAndroidWebMediaPlayer( |
5163 WebMediaPlayerClient* client, | 5185 WebMediaPlayerClient* client, |
5164 WebMediaPlayerEncryptedMediaClient* encrypted_client, | 5186 WebMediaPlayerEncryptedMediaClient* encrypted_client, |
5165 const media::WebMediaPlayerParams& params) { | 5187 const media::WebMediaPlayerParams& params) { |
5166 scoped_refptr<StreamTextureFactory> stream_texture_factory; | 5188 scoped_refptr<StreamTextureFactory> stream_texture_factory; |
5167 if (SynchronousCompositorFactory* factory = | 5189 if (SynchronousCompositorFactory* factory = |
5168 SynchronousCompositorFactory::GetInstance()) { | 5190 SynchronousCompositorFactory::GetInstance()) { |
5169 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); | 5191 stream_texture_factory = factory->CreateStreamTextureFactory(routing_id_); |
5170 } else { | 5192 } else { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5288 mojo::ServiceProviderPtr service_provider; | 5310 mojo::ServiceProviderPtr service_provider; |
5289 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5311 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5290 request->url = mojo::String::From(url); | 5312 request->url = mojo::String::From(url); |
5291 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5313 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5292 nullptr, nullptr, | 5314 nullptr, nullptr, |
5293 base::Bind(&OnGotContentHandlerID)); | 5315 base::Bind(&OnGotContentHandlerID)); |
5294 return service_provider.Pass(); | 5316 return service_provider.Pass(); |
5295 } | 5317 } |
5296 | 5318 |
5297 } // namespace content | 5319 } // namespace content |
OLD | NEW |