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 4781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4792 // non-synchronous navigations. | 4792 // non-synchronous navigations. |
4793 if (!IsBrowserSideNavigationEnabled() || !to_different_document) | 4793 if (!IsBrowserSideNavigationEnabled() || !to_different_document) |
4794 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); | 4794 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); |
4795 } | 4795 } |
4796 | 4796 |
4797 void RenderFrameImpl::didStopLoading() { | 4797 void RenderFrameImpl::didStopLoading() { |
4798 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", | 4798 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", |
4799 "id", routing_id_); | 4799 "id", routing_id_); |
4800 render_view_->FrameDidStopLoading(frame_); | 4800 render_view_->FrameDidStopLoading(frame_); |
4801 Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 4801 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
4802 | |
4803 // Clear any pending NavigationParams if they didn't get used. | |
4804 pending_navigation_params_.reset(); | |
4802 } | 4805 } |
4803 | 4806 |
4804 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { | 4807 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { |
4805 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress)); | 4808 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress)); |
4806 } | 4809 } |
4807 | 4810 |
4808 void RenderFrameImpl::HandleWebAccessibilityEvent( | 4811 void RenderFrameImpl::HandleWebAccessibilityEvent( |
4809 const blink::WebAXObject& obj, blink::WebAXEvent event) { | 4812 const blink::WebAXObject& obj, blink::WebAXEvent event) { |
4810 if (render_accessibility_) | 4813 if (render_accessibility_) |
4811 render_accessibility_->HandleWebAccessibilityEvent(obj, event); | 4814 render_accessibility_->HandleWebAccessibilityEvent(obj, event); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5632 // The browser expects the frame to be loading this navigation. Inform it | 5635 // The browser expects the frame to be loading this navigation. Inform it |
5633 // that the load stopped if needed. | 5636 // that the load stopped if needed. |
5634 // Note: in the case of history navigations, |should_load_request| will be | 5637 // Note: in the case of history navigations, |should_load_request| will be |
5635 // false, and the frame may not have been set in a loading state. Do not | 5638 // false, and the frame may not have been set in a loading state. Do not |
5636 // send a stop message if the HistoryController is loading in this frame | 5639 // send a stop message if the HistoryController is loading in this frame |
5637 // nonetheless. This behavior will go away with subframe navigation | 5640 // nonetheless. This behavior will go away with subframe navigation |
5638 // entries. | 5641 // entries. |
5639 if (!frame_->isLoading() && !has_history_navigation_in_frame) | 5642 if (!frame_->isLoading() && !has_history_navigation_in_frame) |
5640 Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 5643 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
5641 } | 5644 } |
5642 | |
5643 // In case LoadRequest failed before didCreateDataSource was called. | |
5644 pending_navigation_params_.reset(); | |
Avi (use Gerrit)
2016/07/16 02:29:13
OMG I hate pending params. When can we kill them e
Charlie Reis
2016/07/22 18:34:00
Yes, I would love to see them gone. I'm guessing
| |
5645 } | 5645 } |
5646 | 5646 |
5647 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, | 5647 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, |
5648 const std::string& encoding_name) { | 5648 const std::string& encoding_name) { |
5649 // Only update main frame's encoding_name. | 5649 // Only update main frame's encoding_name. |
5650 if (!frame->parent()) | 5650 if (!frame->parent()) |
5651 Send(new FrameHostMsg_UpdateEncoding(routing_id_, encoding_name)); | 5651 Send(new FrameHostMsg_UpdateEncoding(routing_id_, encoding_name)); |
5652 } | 5652 } |
5653 | 5653 |
5654 void RenderFrameImpl::SyncSelectionIfRequired() { | 5654 void RenderFrameImpl::SyncSelectionIfRequired() { |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6335 // event target. Potentially a Pepper plugin will receive the event. | 6335 // event target. Potentially a Pepper plugin will receive the event. |
6336 // In order to tell whether a plugin gets the last mouse event and which it | 6336 // In order to tell whether a plugin gets the last mouse event and which it |
6337 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6337 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6338 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6338 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6339 // |pepper_last_mouse_event_target_|. | 6339 // |pepper_last_mouse_event_target_|. |
6340 pepper_last_mouse_event_target_ = nullptr; | 6340 pepper_last_mouse_event_target_ = nullptr; |
6341 #endif | 6341 #endif |
6342 } | 6342 } |
6343 | 6343 |
6344 } // namespace content | 6344 } // namespace content |
OLD | NEW |