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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 params.referrer = Referrer(); | 601 params.referrer = Referrer(); |
602 | 602 |
603 // Navigations in Web UI pages count as browser-initiated navigations. | 603 // Navigations in Web UI pages count as browser-initiated navigations. |
604 params.is_renderer_initiated = false; | 604 params.is_renderer_initiated = false; |
605 } | 605 } |
606 | 606 |
607 if (delegate_) | 607 if (delegate_) |
608 delegate_->RequestOpenURL(render_frame_host, params); | 608 delegate_->RequestOpenURL(render_frame_host, params); |
609 } | 609 } |
610 | 610 |
| 611 void NavigatorImpl::DidStartLoading(FrameTreeNode* frame_tree_node, |
| 612 bool to_different_document) { |
| 613 delegate_->DidStartLoading(frame_tree_node, |
| 614 to_different_document); |
| 615 } |
| 616 |
| 617 void NavigatorImpl::DidStopLoading() { |
| 618 delegate_->DidStopLoading(); |
| 619 } |
| 620 |
| 621 void NavigatorImpl::DidChangeLoadProgress() { |
| 622 delegate_->DidChangeLoadProgress(); |
| 623 } |
| 624 |
611 // PlzNavigate | 625 // PlzNavigate |
612 void NavigatorImpl::OnBeforeUnloadACK(FrameTreeNode* frame_tree_node, | 626 void NavigatorImpl::OnBeforeUnloadACK(FrameTreeNode* frame_tree_node, |
613 bool proceed) { | 627 bool proceed) { |
614 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 628 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
615 switches::kEnableBrowserSideNavigation)); | 629 switches::kEnableBrowserSideNavigation)); |
616 DCHECK(frame_tree_node); | 630 DCHECK(frame_tree_node); |
617 | 631 |
618 NavigationRequest* navigation_request = | 632 NavigationRequest* navigation_request = |
619 navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); | 633 navigation_request_map_.get(frame_tree_node->frame_tree_node_id()); |
620 | 634 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", | 905 "Navigation.TimeToCommit_ExistingRenderer_BeforeUnloadDiscounted", |
892 time_to_commit); | 906 time_to_commit); |
893 UMA_HISTOGRAM_TIMES( | 907 UMA_HISTOGRAM_TIMES( |
894 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", | 908 "Navigation.TimeToURLJobStart_ExistingRenderer_BeforeUnloadDiscounted", |
895 time_to_network); | 909 time_to_network); |
896 } | 910 } |
897 navigation_data_.reset(); | 911 navigation_data_.reset(); |
898 } | 912 } |
899 | 913 |
900 } // namespace content | 914 } // namespace content |
OLD | NEW |