| Index: components/html_viewer/html_frame.cc
|
| diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc
|
| index a6207d2d83c0cf498ae7f4b5e6a997085264d337..d1d239314211a0e6e3a4cf5779b07df45a20a0a7 100644
|
| --- a/components/html_viewer/html_frame.cc
|
| +++ b/components/html_viewer/html_frame.cc
|
| @@ -271,13 +271,15 @@ bool HTMLFrame::HasLocalDescendant() const {
|
| return false;
|
| }
|
|
|
| -void HTMLFrame::LoadRequest(const blink::WebURLRequest& request) {
|
| +void HTMLFrame::LoadRequest(const blink::WebURLRequest& request,
|
| + base::TimeTicks navigation_start_time) {
|
| DCHECK(IsLocal());
|
|
|
| DVLOG(2) << "HTMLFrame::LoadRequest this=" << this << " id=" << id_
|
| << " URL=" << GURL(request.url());
|
|
|
| pending_navigation_ = false;
|
| + navigation_start_time_ = navigation_start_time;
|
| web_frame_->toWebLocalFrame()->loadRequest(request);
|
| }
|
|
|
| @@ -394,6 +396,8 @@ blink::WebNavigationPolicy HTMLFrame::decidePolicyForNavigation(
|
| << " URL=" << GURL(info.urlRequest.url());
|
|
|
| mojo::URLRequestPtr url_request = mojo::URLRequest::From(info.urlRequest);
|
| + url_request->originating_time_ticks =
|
| + base::TimeTicks::Now().ToInternalValue();
|
| server_->RequestNavigate(
|
| WebNavigationPolicyToNavigationTarget(info.defaultPolicy), id_,
|
| url_request.Pass());
|
| @@ -490,6 +494,13 @@ void HTMLFrame::didCommitProvisionalLoad(
|
| // NavigationControllerImpl::RendererDidNavigate use everything passed
|
| // through.
|
| server_->DidCommitProvisionalLoad();
|
| +
|
| + if (!navigation_start_time_.is_null()) {
|
| + frame->dataSource()->setNavigationStartTime(
|
| + navigation_start_time_.ToInternalValue() /
|
| + static_cast<double>(base::Time::kMicrosecondsPerSecond));
|
| + navigation_start_time_ = base::TimeTicks();
|
| + }
|
| }
|
|
|
| void HTMLFrame::didReceiveTitle(blink::WebLocalFrame* frame,
|
| @@ -781,6 +792,7 @@ void HTMLFrame::OnConnect(web_view::mojom::FramePtr frame,
|
| uint32_t view_id,
|
| web_view::mojom::ViewConnectType view_connect_type,
|
| mojo::Array<web_view::mojom::FrameDataPtr> frame_data,
|
| + int64_t navigation_start_time_ticks,
|
| const OnConnectCallback& callback) {
|
| // This is called if this frame is created by way of OnCreatedFrame().
|
| callback.Run();
|
|
|