| 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 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 NavigationPolicyInfo info(request); | 3477 NavigationPolicyInfo info(request); |
| 3478 info.navigationType = pending_navigation_info_->navigation_type; | 3478 info.navigationType = pending_navigation_info_->navigation_type; |
| 3479 info.defaultPolicy = pending_navigation_info_->policy; | 3479 info.defaultPolicy = pending_navigation_info_->policy; |
| 3480 info.replacesCurrentHistoryItem = | 3480 info.replacesCurrentHistoryItem = |
| 3481 pending_navigation_info_->replaces_current_history_item; | 3481 pending_navigation_info_->replaces_current_history_item; |
| 3482 info.isHistoryNavigationInNewChildFrame = | 3482 info.isHistoryNavigationInNewChildFrame = |
| 3483 pending_navigation_info_->history_navigation_in_new_child_frame; | 3483 pending_navigation_info_->history_navigation_in_new_child_frame; |
| 3484 info.isClientRedirect = pending_navigation_info_->client_redirect; | 3484 info.isClientRedirect = pending_navigation_info_->client_redirect; |
| 3485 info.isCacheDisabled = pending_navigation_info_->cache_disabled; | 3485 info.isCacheDisabled = pending_navigation_info_->cache_disabled; |
| 3486 info.form = pending_navigation_info_->form; | 3486 info.form = pending_navigation_info_->form; |
| 3487 info.sourceLocation = pending_navigation_info_->source_location; |
| 3487 | 3488 |
| 3488 pending_navigation_info_.reset(nullptr); | 3489 pending_navigation_info_.reset(nullptr); |
| 3489 | 3490 |
| 3490 BeginNavigation(info); | 3491 BeginNavigation(info); |
| 3491 } | 3492 } |
| 3492 | 3493 |
| 3493 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 3494 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| 3494 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( | 3495 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( |
| 3495 document_state->navigation_state()); | 3496 document_state->navigation_state()); |
| 3496 bool is_top_most = !frame_->parent(); | 3497 bool is_top_most = !frame_->parent(); |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5746 // calling this on the WebView? | 5747 // calling this on the WebView? |
| 5747 if (auto* webview = render_view_->GetWebView()) | 5748 if (auto* webview = render_view_->GetWebView()) |
| 5748 webview->clearFocusedElement(); | 5749 webview->clearFocusedElement(); |
| 5749 } | 5750 } |
| 5750 | 5751 |
| 5751 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { | 5752 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { |
| 5752 frame_->blinkFeatureUsageReport(features); | 5753 frame_->blinkFeatureUsageReport(features); |
| 5753 } | 5754 } |
| 5754 | 5755 |
| 5755 void RenderFrameImpl::OnMixedContentFound( | 5756 void RenderFrameImpl::OnMixedContentFound( |
| 5756 const GURL& main_resource_url, | 5757 const FrameMsg_MixedContentFound_Params& params) { |
| 5757 const GURL& mixed_content_url, | 5758 blink::WebSourceLocation source_location; |
| 5758 RequestContextType request_context_type, | 5759 source_location.url = WebString::fromLatin1(params.source_location.url); |
| 5759 bool was_allowed, | 5760 source_location.lineNumber = params.source_location.line_number; |
| 5760 bool had_redirect) { | 5761 source_location.columnNumber = params.source_location.column_number; |
| 5761 auto request_context = | 5762 auto request_context = static_cast<blink::WebURLRequest::RequestContext>( |
| 5762 static_cast<blink::WebURLRequest::RequestContext>(request_context_type); | 5763 params.request_context_type); |
| 5763 frame_->mixedContentFound(main_resource_url, mixed_content_url, | 5764 frame_->mixedContentFound(params.main_resource_url, params.mixed_content_url, |
| 5764 request_context, was_allowed, had_redirect); | 5765 request_context, params.was_allowed, |
| 5766 params.had_redirect, source_location); |
| 5765 } | 5767 } |
| 5766 | 5768 |
| 5767 #if defined(OS_ANDROID) | 5769 #if defined(OS_ANDROID) |
| 5768 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, | 5770 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, |
| 5769 float x, | 5771 float x, |
| 5770 float y) { | 5772 float y) { |
| 5771 WebRect selection_rect; | 5773 WebRect selection_rect; |
| 5772 int ordinal = | 5774 int ordinal = |
| 5773 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); | 5775 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); |
| 5774 if (ordinal == -1) { | 5776 if (ordinal == -1) { |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6917 // And then the mouse event is forwarded to blink, which dispatches it to the | 6919 // And then the mouse event is forwarded to blink, which dispatches it to the |
| 6918 // event target. Potentially a Pepper plugin will receive the event. | 6920 // event target. Potentially a Pepper plugin will receive the event. |
| 6919 // In order to tell whether a plugin gets the last mouse event and which it | 6921 // In order to tell whether a plugin gets the last mouse event and which it |
| 6920 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6922 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6921 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6923 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6922 // |pepper_last_mouse_event_target_|. | 6924 // |pepper_last_mouse_event_target_|. |
| 6923 pepper_last_mouse_event_target_ = nullptr; | 6925 pepper_last_mouse_event_target_ = nullptr; |
| 6924 #endif | 6926 #endif |
| 6925 } | 6927 } |
| 6926 | 6928 |
| 6929 RenderFrameImpl::PendingNavigationInfo::PendingNavigationInfo( |
| 6930 const NavigationPolicyInfo& info) |
| 6931 : navigation_type(info.navigationType), |
| 6932 policy(info.defaultPolicy), |
| 6933 replaces_current_history_item(info.replacesCurrentHistoryItem), |
| 6934 history_navigation_in_new_child_frame( |
| 6935 info.isHistoryNavigationInNewChildFrame), |
| 6936 client_redirect(info.isClientRedirect), |
| 6937 cache_disabled(info.isCacheDisabled), |
| 6938 form(info.form), |
| 6939 source_location(info.sourceLocation) {} |
| 6940 |
| 6927 } // namespace content | 6941 } // namespace content |
| OLD | NEW |