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

Side by Side Diff: content/public/browser/navigation_handle.cc

Issue 1425823002: (DEPRECATED) Send navigation_start to browser process in DidStartProvisionalLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stop calling didCreateDataSource for same-page navs Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/browser/navigation_handle.h" 5 #include "content/public/browser/navigation_handle.h"
6 6
7 #include "content/browser/frame_host/navigation_handle_impl.h" 7 #include "content/browser/frame_host/navigation_handle_impl.h"
8 #include "content/browser/frame_host/navigator.h" 8 #include "content/browser/frame_host/navigator.h"
9 #include "content/browser/frame_host/render_frame_host_impl.h" 9 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 WebContents* NavigationHandle::GetWebContents() { 14 WebContents* NavigationHandle::GetWebContents() {
15 // The NavigationHandleImpl cannot access the WebContentsImpl as it would be 15 // The NavigationHandleImpl cannot access the WebContentsImpl as it would be
16 // a layering violation, hence the cast here. 16 // a layering violation, hence the cast here.
17 return static_cast<WebContentsImpl*>( 17 return static_cast<WebContentsImpl*>(
18 static_cast<NavigationHandleImpl*>(this)->GetDelegate()); 18 static_cast<NavigationHandleImpl*>(this)->GetDelegate());
19 } 19 }
20 20
21 // static 21 // static
22 scoped_ptr<NavigationHandle> NavigationHandle::CreateNavigationHandleForTesting( 22 scoped_ptr<NavigationHandle> NavigationHandle::CreateNavigationHandleForTesting(
23 const GURL& url, 23 const GURL& url,
24 RenderFrameHost* render_frame_host) { 24 RenderFrameHost* render_frame_host) {
25 scoped_ptr<NavigationHandleImpl> handle_impl = NavigationHandleImpl::Create( 25 scoped_ptr<NavigationHandleImpl> handle_impl = NavigationHandleImpl::Create(
26 url, 26 url,
27 static_cast<RenderFrameHostImpl*>(render_frame_host)->frame_tree_node()); 27 static_cast<RenderFrameHostImpl*>(render_frame_host)->frame_tree_node(),
28 base::TimeTicks::Now());
28 return scoped_ptr<NavigationHandle>(handle_impl.Pass()); 29 return scoped_ptr<NavigationHandle>(handle_impl.Pass());
29 } 30 }
30 31
31 } // namespace content 32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698