Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Addressed nasko@'s comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 OnGetSerializedHtmlWithLocalLinks) 1585 OnGetSerializedHtmlWithLocalLinks)
1586 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1586 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1587 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1587 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1588 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) 1588 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch)
1589 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1589 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1590 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1590 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1591 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, 1591 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
1592 OnSuppressFurtherDialogs) 1592 OnSuppressFurtherDialogs)
1593 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) 1593 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
1594 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) 1594 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement)
1595 IPC_MESSAGE_HANDLER(FrameMsg_BlinkFeatureUsageReport,
1596 OnBlinkFeatureUsageReport)
1597 IPC_MESSAGE_HANDLER(FrameMsg_MixedContentFound, OnMixedContentFound)
1595 #if defined(OS_ANDROID) 1598 #if defined(OS_ANDROID)
1596 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, 1599 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
1597 OnActivateNearestFindResult) 1600 OnActivateNearestFindResult)
1598 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, 1601 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult,
1599 OnGetNearestFindResult) 1602 OnGetNearestFindResult)
1600 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1603 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1601 #endif 1604 #endif
1602 1605
1603 #if defined(USE_EXTERNAL_POPUP_MENU) 1606 #if defined(USE_EXTERNAL_POPUP_MENU)
1604 #if defined(OS_MACOSX) 1607 #if defined(OS_MACOSX)
(...skipping 4095 matching lines...) Expand 10 before | Expand all | Expand 10 after
5700 } 5703 }
5701 } 5704 }
5702 5705
5703 void RenderFrameImpl::OnClearFocusedElement() { 5706 void RenderFrameImpl::OnClearFocusedElement() {
5704 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid 5707 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid
5705 // calling this on the WebView? 5708 // calling this on the WebView?
5706 if (auto* webview = render_view_->GetWebView()) 5709 if (auto* webview = render_view_->GetWebView())
5707 webview->clearFocusedElement(); 5710 webview->clearFocusedElement();
5708 } 5711 }
5709 5712
5713 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) {
5714 frame_->blinkFeatureUsageReport(features);
5715 }
5716
5717 void RenderFrameImpl::OnMixedContentFound(
5718 const GURL& main_resource_url,
5719 const GURL& mixed_content_url,
5720 RequestContextType request_context_type,
5721 bool was_allowed,
5722 bool had_redirect) {
5723 auto request_context =
5724 static_cast<blink::WebURLRequest::RequestContext>(request_context_type);
5725 frame_->mixedContentFound(main_resource_url, mixed_content_url,
5726 request_context, was_allowed, had_redirect);
5727 }
5728
5710 #if defined(OS_ANDROID) 5729 #if defined(OS_ANDROID)
5711 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, 5730 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
5712 float x, 5731 float x,
5713 float y) { 5732 float y) {
5714 WebRect selection_rect; 5733 WebRect selection_rect;
5715 int ordinal = 5734 int ordinal =
5716 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); 5735 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect);
5717 if (ordinal == -1) { 5736 if (ordinal == -1) {
5718 // Something went wrong, so send a no-op reply (force the frame to report 5737 // Something went wrong, so send a no-op reply (force the frame to report
5719 // the current match count) in case the host is waiting for a response due 5738 // the current match count) in case the host is waiting for a response due
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6826 // event target. Potentially a Pepper plugin will receive the event. 6845 // event target. Potentially a Pepper plugin will receive the event.
6827 // In order to tell whether a plugin gets the last mouse event and which it 6846 // In order to tell whether a plugin gets the last mouse event and which it
6828 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6847 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6829 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6848 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6830 // |pepper_last_mouse_event_target_|. 6849 // |pepper_last_mouse_event_target_|.
6831 pepper_last_mouse_event_target_ = nullptr; 6850 pepper_last_mouse_event_target_ = nullptr;
6832 #endif 6851 #endif
6833 } 6852 }
6834 6853
6835 } // namespace content 6854 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698