| 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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1563 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
| 1564 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1564 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
| 1565 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1565 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
| 1566 OnSetFrameOwnerProperties) | 1566 OnSetFrameOwnerProperties) |
| 1567 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1567 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
| 1568 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
| 1569 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1569 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
| 1570 OnTextTrackSettingsChanged) | 1570 OnTextTrackSettingsChanged) |
| 1571 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1571 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
| 1572 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) | 1572 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
| 1573 IPC_MESSAGE_HANDLER(FrameMsg_DroppedNavigation, OnDroppedNavigation) |
| 1573 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, | 1574 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
| 1574 OnGetSavableResourceLinks) | 1575 OnGetSavableResourceLinks) |
| 1575 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1576 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
| 1576 OnGetSerializedHtmlWithLocalLinks) | 1577 OnGetSerializedHtmlWithLocalLinks) |
| 1577 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1578 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
| 1578 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1579 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
| 1579 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) | 1580 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) |
| 1580 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) | 1581 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) |
| 1581 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1582 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
| 1582 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, | 1583 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, |
| (...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4019 | 4020 |
| 4020 void RenderFrameImpl::dispatchLoad() { | 4021 void RenderFrameImpl::dispatchLoad() { |
| 4021 Send(new FrameHostMsg_DispatchLoad(routing_id_)); | 4022 Send(new FrameHostMsg_DispatchLoad(routing_id_)); |
| 4022 } | 4023 } |
| 4023 | 4024 |
| 4024 blink::WebEffectiveConnectionType | 4025 blink::WebEffectiveConnectionType |
| 4025 RenderFrameImpl::getEffectiveConnectionType() { | 4026 RenderFrameImpl::getEffectiveConnectionType() { |
| 4026 return effective_connection_type_; | 4027 return effective_connection_type_; |
| 4027 } | 4028 } |
| 4028 | 4029 |
| 4030 void RenderFrameImpl::abortClientNavigation() { |
| 4031 Send(new FrameHostMsg_AbortNavigation(routing_id_)); |
| 4032 } |
| 4033 |
| 4029 void RenderFrameImpl::didChangeSelection(bool is_empty_selection) { | 4034 void RenderFrameImpl::didChangeSelection(bool is_empty_selection) { |
| 4030 if (!GetRenderWidget()->input_handler().handling_input_event() && | 4035 if (!GetRenderWidget()->input_handler().handling_input_event() && |
| 4031 !handling_select_range_) | 4036 !handling_select_range_) |
| 4032 return; | 4037 return; |
| 4033 | 4038 |
| 4034 if (is_empty_selection) | 4039 if (is_empty_selection) |
| 4035 selection_text_.clear(); | 4040 selection_text_.clear(); |
| 4036 | 4041 |
| 4037 // UpdateTextInputState should be called before SyncSelectionIfRequired. | 4042 // UpdateTextInputState should be called before SyncSelectionIfRequired. |
| 4038 // UpdateTextInputState may send TextInputStateChanged to notify the focus | 4043 // UpdateTextInputState may send TextInputStateChanged to notify the focus |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5242 // provisionalDataSource(), LoadNavigationErrorPage wasn't called, so do it | 5247 // provisionalDataSource(), LoadNavigationErrorPage wasn't called, so do it |
| 5243 // now. | 5248 // now. |
| 5244 if (request_params.nav_entry_id != 0 || !had_provisional_data_source) { | 5249 if (request_params.nav_entry_id != 0 || !had_provisional_data_source) { |
| 5245 LoadNavigationErrorPage(failed_request, error, replace, | 5250 LoadNavigationErrorPage(failed_request, error, replace, |
| 5246 history_entry.get()); | 5251 history_entry.get()); |
| 5247 } | 5252 } |
| 5248 | 5253 |
| 5249 browser_side_navigation_pending_ = false; | 5254 browser_side_navigation_pending_ = false; |
| 5250 } | 5255 } |
| 5251 | 5256 |
| 5257 void RenderFrameImpl::OnDroppedNavigation() { |
| 5258 browser_side_navigation_pending_ = false; |
| 5259 frame_->clientDroppedNavigation(); |
| 5260 } |
| 5261 |
| 5252 WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( | 5262 WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( |
| 5253 const NavigationPolicyInfo& info) { | 5263 const NavigationPolicyInfo& info) { |
| 5254 // A content initiated navigation may have originated from a link-click, | 5264 // A content initiated navigation may have originated from a link-click, |
| 5255 // script, drag-n-drop operation, etc. | 5265 // script, drag-n-drop operation, etc. |
| 5256 // info.extraData is only non-null if this is a redirect. Use the extraData | 5266 // info.extraData is only non-null if this is a redirect. Use the extraData |
| 5257 // initiation information for redirects, and check pending_navigation_params_ | 5267 // initiation information for redirects, and check pending_navigation_params_ |
| 5258 // otherwise. | 5268 // otherwise. |
| 5259 bool is_content_initiated = | 5269 bool is_content_initiated = |
| 5260 info.extraData | 5270 info.extraData |
| 5261 ? static_cast<DocumentState*>(info.extraData) | 5271 ? static_cast<DocumentState*>(info.extraData) |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6870 // event target. Potentially a Pepper plugin will receive the event. | 6880 // event target. Potentially a Pepper plugin will receive the event. |
| 6871 // In order to tell whether a plugin gets the last mouse event and which it | 6881 // In order to tell whether a plugin gets the last mouse event and which it |
| 6872 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6882 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6873 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6883 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6874 // |pepper_last_mouse_event_target_|. | 6884 // |pepper_last_mouse_event_target_|. |
| 6875 pepper_last_mouse_event_target_ = nullptr; | 6885 pepper_last_mouse_event_target_ = nullptr; |
| 6876 #endif | 6886 #endif |
| 6877 } | 6887 } |
| 6878 | 6888 |
| 6879 } // namespace content | 6889 } // namespace content |
| OLD | NEW |