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 4809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4820 // non-synchronous navigations. | 4820 // non-synchronous navigations. |
4821 if (!IsBrowserSideNavigationEnabled() || !to_different_document) | 4821 if (!IsBrowserSideNavigationEnabled() || !to_different_document) |
4822 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); | 4822 Send(new FrameHostMsg_DidStartLoading(routing_id_, to_different_document)); |
4823 } | 4823 } |
4824 | 4824 |
4825 void RenderFrameImpl::didStopLoading() { | 4825 void RenderFrameImpl::didStopLoading() { |
4826 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", | 4826 TRACE_EVENT1("navigation", "RenderFrameImpl::didStopLoading", |
4827 "id", routing_id_); | 4827 "id", routing_id_); |
4828 render_view_->FrameDidStopLoading(frame_); | 4828 render_view_->FrameDidStopLoading(frame_); |
4829 Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 4829 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
| 4830 |
| 4831 // Clear any pending NavigationParams if they didn't get used. |
| 4832 pending_navigation_params_.reset(); |
4830 } | 4833 } |
4831 | 4834 |
4832 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { | 4835 void RenderFrameImpl::didChangeLoadProgress(double load_progress) { |
4833 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress)); | 4836 Send(new FrameHostMsg_DidChangeLoadProgress(routing_id_, load_progress)); |
4834 } | 4837 } |
4835 | 4838 |
4836 void RenderFrameImpl::HandleWebAccessibilityEvent( | 4839 void RenderFrameImpl::HandleWebAccessibilityEvent( |
4837 const blink::WebAXObject& obj, blink::WebAXEvent event) { | 4840 const blink::WebAXObject& obj, blink::WebAXEvent event) { |
4838 if (render_accessibility_) | 4841 if (render_accessibility_) |
4839 render_accessibility_->HandleWebAccessibilityEvent(obj, event); | 4842 render_accessibility_->HandleWebAccessibilityEvent(obj, event); |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5661 // The browser expects the frame to be loading this navigation. Inform it | 5664 // The browser expects the frame to be loading this navigation. Inform it |
5662 // that the load stopped if needed. | 5665 // that the load stopped if needed. |
5663 // Note: in the case of history navigations, |should_load_request| will be | 5666 // Note: in the case of history navigations, |should_load_request| will be |
5664 // false, and the frame may not have been set in a loading state. Do not | 5667 // false, and the frame may not have been set in a loading state. Do not |
5665 // send a stop message if the HistoryController is loading in this frame | 5668 // send a stop message if the HistoryController is loading in this frame |
5666 // nonetheless. This behavior will go away with subframe navigation | 5669 // nonetheless. This behavior will go away with subframe navigation |
5667 // entries. | 5670 // entries. |
5668 if (!frame_->isLoading() && !has_history_navigation_in_frame) | 5671 if (!frame_->isLoading() && !has_history_navigation_in_frame) |
5669 Send(new FrameHostMsg_DidStopLoading(routing_id_)); | 5672 Send(new FrameHostMsg_DidStopLoading(routing_id_)); |
5670 } | 5673 } |
5671 | |
5672 // In case LoadRequest failed before didCreateDataSource was called. | |
5673 pending_navigation_params_.reset(); | |
5674 } | 5674 } |
5675 | 5675 |
5676 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, | 5676 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, |
5677 const std::string& encoding_name) { | 5677 const std::string& encoding_name) { |
5678 // Only update main frame's encoding_name. | 5678 // Only update main frame's encoding_name. |
5679 if (!frame->parent()) | 5679 if (!frame->parent()) |
5680 Send(new FrameHostMsg_UpdateEncoding(routing_id_, encoding_name)); | 5680 Send(new FrameHostMsg_UpdateEncoding(routing_id_, encoding_name)); |
5681 } | 5681 } |
5682 | 5682 |
5683 void RenderFrameImpl::SyncSelectionIfRequired() { | 5683 void RenderFrameImpl::SyncSelectionIfRequired() { |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 // event target. Potentially a Pepper plugin will receive the event. | 6366 // event target. Potentially a Pepper plugin will receive the event. |
6367 // In order to tell whether a plugin gets the last mouse event and which it | 6367 // In order to tell whether a plugin gets the last mouse event and which it |
6368 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6368 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6369 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6369 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6370 // |pepper_last_mouse_event_target_|. | 6370 // |pepper_last_mouse_event_target_|. |
6371 pepper_last_mouse_event_target_ = nullptr; | 6371 pepper_last_mouse_event_target_ = nullptr; |
6372 #endif | 6372 #endif |
6373 } | 6373 } |
6374 | 6374 |
6375 } // namespace content | 6375 } // namespace content |
OLD | NEW |