| 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/browser/frame_host/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 RequestNavigationParams request_params(entry.GetHasPostData(), | 810 RequestNavigationParams request_params(entry.GetHasPostData(), |
| 811 entry.extra_headers(), | 811 entry.extra_headers(), |
| 812 entry.GetBrowserInitiatedPostData()); | 812 entry.GetBrowserInitiatedPostData()); |
| 813 // TODO(clamy): Check if navigations are blocked and if so store the | 813 // TODO(clamy): Check if navigations are blocked and if so store the |
| 814 // parameters. | 814 // parameters. |
| 815 | 815 |
| 816 // If there is an ongoing request, replace it. | 816 // If there is an ongoing request, replace it. |
| 817 navigation_request_map_.set(frame_tree_node_id, navigation_request.Pass()); | 817 navigation_request_map_.set(frame_tree_node_id, navigation_request.Pass()); |
| 818 | 818 |
| 819 if (frame_tree_node->current_frame_host()->IsRenderFrameLive()) { | 819 if (frame_tree_node->current_frame_host()->IsRenderFrameLive()) { |
| 820 // TODO(clamy): send a RequestNavigation IPC. | 820 frame_tree_node->current_frame_host()->RequestNavigation( |
| 821 NOTIMPLEMENTED(); | 821 navigation_request->common_params(), request_params); |
| 822 return true; | 822 return true; |
| 823 } | 823 } |
| 824 | 824 |
| 825 // The navigation request is sent directly to the IO thread. | 825 // The navigation request is sent directly to the IO thread. |
| 826 OnBeginNavigation( | 826 OnBeginNavigation( |
| 827 frame_tree_node, | 827 frame_tree_node, |
| 828 MakeDefaultBeginNavigation(request_params, navigation_type), | 828 MakeDefaultBeginNavigation(request_params, navigation_type), |
| 829 navigation_request_map_.get(frame_tree_node_id)->common_params()); | 829 navigation_request_map_.get(frame_tree_node_id)->common_params()); |
| 830 return true; | 830 return true; |
| 831 } | 831 } |
| 832 | 832 |
| 833 } // namespace content | 833 } // namespace content |
| OLD | NEW |