| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "content/browser/frame_host/navigation_handle_impl.h" | 9 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 RenderFrameHost* render_frame_host, | 27 RenderFrameHost* render_frame_host, |
| 28 bool committed, | 28 bool committed, |
| 29 net::Error error, | 29 net::Error error, |
| 30 bool has_user_gesture) { | 30 bool has_user_gesture) { |
| 31 std::unique_ptr<NavigationHandleImpl> handle_impl = | 31 std::unique_ptr<NavigationHandleImpl> handle_impl = |
| 32 NavigationHandleImpl::Create( | 32 NavigationHandleImpl::Create( |
| 33 url, static_cast<RenderFrameHostImpl*>(render_frame_host) | 33 url, static_cast<RenderFrameHostImpl*>(render_frame_host) |
| 34 ->frame_tree_node(), | 34 ->frame_tree_node(), |
| 35 true, // is_renderer_initiated | 35 true, // is_renderer_initiated |
| 36 false, // is_same_page | 36 false, // is_same_page |
| 37 false, // is_srcdoc | |
| 38 base::TimeTicks::Now(), 0, | 37 base::TimeTicks::Now(), 0, |
| 39 has_user_gesture ? NavigationGestureUser : NavigationGestureAuto, | 38 has_user_gesture ? NavigationGestureUser : NavigationGestureAuto, |
| 40 false); // started_from_context_menu | 39 false); // started_from_context_menu |
| 41 handle_impl->set_render_frame_host( | 40 handle_impl->set_render_frame_host( |
| 42 static_cast<RenderFrameHostImpl*>(render_frame_host)); | 41 static_cast<RenderFrameHostImpl*>(render_frame_host)); |
| 43 if (error != net::OK) | 42 if (error != net::OK) |
| 44 handle_impl->set_net_error_code(error); | 43 handle_impl->set_net_error_code(error); |
| 45 if (committed) | 44 if (committed) |
| 46 handle_impl->CallDidCommitNavigationForTesting(url); | 45 handle_impl->CallDidCommitNavigationForTesting(url); |
| 47 return std::unique_ptr<NavigationHandle>(std::move(handle_impl)); | 46 return std::unique_ptr<NavigationHandle>(std::move(handle_impl)); |
| 48 } | 47 } |
| 49 | 48 |
| 50 } // namespace content | 49 } // namespace content |
| OLD | NEW |