| 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 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3468 NavigationPolicyInfo info(request); | 3468 NavigationPolicyInfo info(request); |
| 3469 info.navigationType = pending_navigation_info_->navigation_type; | 3469 info.navigationType = pending_navigation_info_->navigation_type; |
| 3470 info.defaultPolicy = pending_navigation_info_->policy; | 3470 info.defaultPolicy = pending_navigation_info_->policy; |
| 3471 info.replacesCurrentHistoryItem = | 3471 info.replacesCurrentHistoryItem = |
| 3472 pending_navigation_info_->replaces_current_history_item; | 3472 pending_navigation_info_->replaces_current_history_item; |
| 3473 info.isHistoryNavigationInNewChildFrame = | 3473 info.isHistoryNavigationInNewChildFrame = |
| 3474 pending_navigation_info_->history_navigation_in_new_child_frame; | 3474 pending_navigation_info_->history_navigation_in_new_child_frame; |
| 3475 info.isClientRedirect = pending_navigation_info_->client_redirect; | 3475 info.isClientRedirect = pending_navigation_info_->client_redirect; |
| 3476 info.isCacheDisabled = pending_navigation_info_->cache_disabled; | 3476 info.isCacheDisabled = pending_navigation_info_->cache_disabled; |
| 3477 info.form = pending_navigation_info_->form; | 3477 info.form = pending_navigation_info_->form; |
| 3478 info.sourceLocation = pending_navigation_info_->location; |
| 3478 | 3479 |
| 3479 pending_navigation_info_.reset(nullptr); | 3480 pending_navigation_info_.reset(nullptr); |
| 3480 | 3481 |
| 3481 BeginNavigation(info); | 3482 BeginNavigation(info); |
| 3482 } | 3483 } |
| 3483 | 3484 |
| 3484 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 3485 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| 3485 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( | 3486 NavigationStateImpl* navigation_state = static_cast<NavigationStateImpl*>( |
| 3486 document_state->navigation_state()); | 3487 document_state->navigation_state()); |
| 3487 bool is_top_most = !frame_->parent(); | 3488 bool is_top_most = !frame_->parent(); |
| (...skipping 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5724 // calling this on the WebView? | 5725 // calling this on the WebView? |
| 5725 if (auto* webview = render_view_->GetWebView()) | 5726 if (auto* webview = render_view_->GetWebView()) |
| 5726 webview->clearFocusedElement(); | 5727 webview->clearFocusedElement(); |
| 5727 } | 5728 } |
| 5728 | 5729 |
| 5729 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { | 5730 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { |
| 5730 frame_->blinkFeatureUsageReport(features); | 5731 frame_->blinkFeatureUsageReport(features); |
| 5731 } | 5732 } |
| 5732 | 5733 |
| 5733 void RenderFrameImpl::OnMixedContentFound( | 5734 void RenderFrameImpl::OnMixedContentFound( |
| 5734 const GURL& main_resource_url, | 5735 const FrameMsg_MixedContentFound_Params& params) { |
| 5735 const GURL& mixed_content_url, | 5736 blink::WebSourceLocation source_location; |
| 5736 RequestContextType request_context_type, | 5737 source_location.url = WebString::fromLatin1(params.source_location.url); |
| 5737 bool was_allowed, | 5738 source_location.lineNumber = params.source_location.line_number; |
| 5738 bool had_redirect) { | 5739 source_location.columnNumber = params.source_location.column_number; |
| 5739 auto request_context = | 5740 auto request_context = static_cast<blink::WebURLRequest::RequestContext>( |
| 5740 static_cast<blink::WebURLRequest::RequestContext>(request_context_type); | 5741 params.request_context_type); |
| 5741 frame_->mixedContentFound(main_resource_url, mixed_content_url, | 5742 frame_->mixedContentFound(params.main_resource_url, params.mixed_content_url, |
| 5742 request_context, was_allowed, had_redirect); | 5743 request_context, params.was_allowed, |
| 5744 params.had_redirect, source_location); |
| 5743 } | 5745 } |
| 5744 | 5746 |
| 5745 #if defined(OS_ANDROID) | 5747 #if defined(OS_ANDROID) |
| 5746 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, | 5748 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, |
| 5747 float x, | 5749 float x, |
| 5748 float y) { | 5750 float y) { |
| 5749 WebRect selection_rect; | 5751 WebRect selection_rect; |
| 5750 int ordinal = | 5752 int ordinal = |
| 5751 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); | 5753 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); |
| 5752 if (ordinal == -1) { | 5754 if (ordinal == -1) { |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6890 // And then the mouse event is forwarded to blink, which dispatches it to the | 6892 // And then the mouse event is forwarded to blink, which dispatches it to the |
| 6891 // event target. Potentially a Pepper plugin will receive the event. | 6893 // event target. Potentially a Pepper plugin will receive the event. |
| 6892 // In order to tell whether a plugin gets the last mouse event and which it | 6894 // In order to tell whether a plugin gets the last mouse event and which it |
| 6893 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6895 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6894 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6896 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6895 // |pepper_last_mouse_event_target_|. | 6897 // |pepper_last_mouse_event_target_|. |
| 6896 pepper_last_mouse_event_target_ = nullptr; | 6898 pepper_last_mouse_event_target_ = nullptr; |
| 6897 #endif | 6899 #endif |
| 6898 } | 6900 } |
| 6899 | 6901 |
| 6902 RenderFrameImpl::PendingNavigationInfo::PendingNavigationInfo( |
| 6903 const NavigationPolicyInfo& info) |
| 6904 : navigation_type(info.navigationType), |
| 6905 policy(info.defaultPolicy), |
| 6906 replaces_current_history_item(info.replacesCurrentHistoryItem), |
| 6907 history_navigation_in_new_child_frame( |
| 6908 info.isHistoryNavigationInNewChildFrame), |
| 6909 client_redirect(info.isClientRedirect), |
| 6910 cache_disabled(info.isCacheDisabled), |
| 6911 form(info.form), |
| 6912 location(info.sourceLocation) {} |
| 6913 |
| 6900 } // namespace content | 6914 } // namespace content |
| OLD | NEW |