| 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/renderer/render_frame_impl.h" |     5 #include "content/renderer/render_frame_impl.h" | 
|     6  |     6  | 
|     7 #include <map> |     7 #include <map> | 
|     8 #include <string> |     8 #include <string> | 
|     9 #include <utility> |     9 #include <utility> | 
|    10 #include <vector> |    10 #include <vector> | 
| (...skipping 4650 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4661  |  4661  | 
|  4662   // If we end up reusing this WebRequest (for example, due to a #ref click), |  4662   // If we end up reusing this WebRequest (for example, due to a #ref click), | 
|  4663   // we don't want the transition type to persist.  Just clear it. |  4663   // we don't want the transition type to persist.  Just clear it. | 
|  4664   navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK); |  4664   navigation_state->set_transition_type(ui::PAGE_TRANSITION_LINK); | 
|  4665 } |  4665 } | 
|  4666  |  4666  | 
|  4667 void RenderFrameImpl::didStartLoading(bool to_different_document) { |  4667 void RenderFrameImpl::didStartLoading(bool to_different_document) { | 
|  4668   TRACE_EVENT1("navigation", "RenderFrameImpl::didStartLoading", |  4668   TRACE_EVENT1("navigation", "RenderFrameImpl::didStartLoading", | 
|  4669                "id", routing_id_); |  4669                "id", routing_id_); | 
|  4670   render_view_->FrameDidStartLoading(frame_); |  4670   render_view_->FrameDidStartLoading(frame_); | 
|  4671   Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); |  4671  | 
 |  4672   // PlzNavigate: the browser is responsible for knowing the start of all | 
 |  4673   // non-synchronous navigations. | 
 |  4674   if (!IsBrowserSideNavigationEnabled() || !to_different_document) | 
 |  4675     Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); | 
|  4672 } |  4676 } | 
|  4673  |  4677  | 
|  4674 void RenderFrameImpl::didStopLoading() { |  4678 void RenderFrameImpl::didStopLoading() { | 
|  4675   TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", |  4679   TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", | 
|  4676                "id", routing_id_); |  4680                "id", routing_id_); | 
|  4677   render_view_->FrameDidStopLoading(frame_); |  4681   render_view_->FrameDidStopLoading(frame_); | 
|  4678   Send(new FrameHostMsg_DidStopLoading(routing_id_)); |  4682   Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 
|  4679 } |  4683 } | 
|  4680  |  4684  | 
|  4681 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { |  4685 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { | 
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4957     return blink::WebNavigationPolicyIgnore; |  4961     return blink::WebNavigationPolicyIgnore; | 
|  4958   } |  4962   } | 
|  4959  |  4963  | 
|  4960   // PlzNavigate: if the navigation is not synchronous, send it to the browser. |  4964   // PlzNavigate: if the navigation is not synchronous, send it to the browser. | 
|  4961   // This includes navigations with no request being sent to the network stack. |  4965   // This includes navigations with no request being sent to the network stack. | 
|  4962   if (IsBrowserSideNavigationEnabled() && |  4966   if (IsBrowserSideNavigationEnabled() && | 
|  4963       info.urlRequest.checkForBrowserSideNavigation() && |  4967       info.urlRequest.checkForBrowserSideNavigation() && | 
|  4964       ShouldMakeNetworkRequestForURL(url)) { |  4968       ShouldMakeNetworkRequestForURL(url)) { | 
|  4965     BeginNavigation(&info.urlRequest, info.replacesCurrentHistoryItem, |  4969     BeginNavigation(&info.urlRequest, info.replacesCurrentHistoryItem, | 
|  4966                     info.isClientRedirect); |  4970                     info.isClientRedirect); | 
|  4967     return blink::WebNavigationPolicyIgnore; |  4971     return blink::WebNavigationPolicyHandledByClient; | 
|  4968   } |  4972   } | 
|  4969  |  4973  | 
|  4970   return info.defaultPolicy; |  4974   return info.defaultPolicy; | 
|  4971 } |  4975 } | 
|  4972  |  4976  | 
|  4973 void RenderFrameImpl::OnGetSavableResourceLinks() { |  4977 void RenderFrameImpl::OnGetSavableResourceLinks() { | 
|  4974   std::vector<GURL> resources_list; |  4978   std::vector<GURL> resources_list; | 
|  4975   std::vector<SavableSubframe> subframes; |  4979   std::vector<SavableSubframe> subframes; | 
|  4976   SavableResourcesResult result(&resources_list, &subframes); |  4980   SavableResourcesResult result(&resources_list, &subframes); | 
|  4977  |  4981  | 
| (...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6139                                     int match_count, |  6143                                     int match_count, | 
|  6140                                     int ordinal, |  6144                                     int ordinal, | 
|  6141                                     const WebRect& selection_rect, |  6145                                     const WebRect& selection_rect, | 
|  6142                                     bool final_status_update) { |  6146                                     bool final_status_update) { | 
|  6143   Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |  6147   Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 
|  6144                                    selection_rect, ordinal, |  6148                                    selection_rect, ordinal, | 
|  6145                                    final_status_update)); |  6149                                    final_status_update)); | 
|  6146 } |  6150 } | 
|  6147  |  6151  | 
|  6148 }  // namespace content |  6152 }  // namespace content | 
| OLD | NEW |