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

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: Minor changes from 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 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 OnGetSerializedHtmlWithLocalLinks) 1559 OnGetSerializedHtmlWithLocalLinks)
1560 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1560 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1561 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1561 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1562 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) 1562 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch)
1563 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1563 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1564 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1564 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1565 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, 1565 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
1566 OnSuppressFurtherDialogs) 1566 OnSuppressFurtherDialogs)
1567 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) 1567 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
1568 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) 1568 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement)
1569 IPC_MESSAGE_HANDLER(FrameMsg_BlinkFeatureUsageReport,
1570 OnBlinkFeatureUsageReport)
1571 IPC_MESSAGE_HANDLER(FrameMsg_MixedContentFound, OnMixedContentFound)
1569 #if defined(OS_ANDROID) 1572 #if defined(OS_ANDROID)
1570 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, 1573 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
1571 OnActivateNearestFindResult) 1574 OnActivateNearestFindResult)
1572 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, 1575 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult,
1573 OnGetNearestFindResult) 1576 OnGetNearestFindResult)
1574 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1577 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1575 #endif 1578 #endif
1576 1579
1577 #if defined(USE_EXTERNAL_POPUP_MENU) 1580 #if defined(USE_EXTERNAL_POPUP_MENU)
1578 #if defined(OS_MACOSX) 1581 #if defined(OS_MACOSX)
(...skipping 4107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5686 } 5689 }
5687 } 5690 }
5688 5691
5689 void RenderFrameImpl::OnClearFocusedElement() { 5692 void RenderFrameImpl::OnClearFocusedElement() {
5690 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid 5693 // TODO(ekaramad): Should we add a method to WebLocalFrame instead and avoid
5691 // calling this on the WebView? 5694 // calling this on the WebView?
5692 if (auto* webview = render_view_->GetWebView()) 5695 if (auto* webview = render_view_->GetWebView())
5693 webview->clearFocusedElement(); 5696 webview->clearFocusedElement();
5694 } 5697 }
5695 5698
5699 void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) {
5700 frame_->blinkFeatureUsageReport(features);
5701 }
5702
5703 void RenderFrameImpl::OnMixedContentFound(
5704 const GURL& main_resource_url,
5705 const GURL& mixed_content_url,
5706 RequestContextType request_context_type,
5707 bool was_allowed,
5708 bool had_redirect) {
5709 auto request_context =
5710 static_cast<blink::WebURLRequest::RequestContext>(request_context_type);
5711 frame_->mixedContentFound(main_resource_url, mixed_content_url,
5712 request_context, was_allowed, had_redirect);
5713 }
5714
5696 #if defined(OS_ANDROID) 5715 #if defined(OS_ANDROID)
5697 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, 5716 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
5698 float x, 5717 float x,
5699 float y) { 5718 float y) {
5700 WebRect selection_rect; 5719 WebRect selection_rect;
5701 int ordinal = 5720 int ordinal =
5702 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); 5721 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect);
5703 if (ordinal == -1) { 5722 if (ordinal == -1) {
5704 // Something went wrong, so send a no-op reply (force the frame to report 5723 // Something went wrong, so send a no-op reply (force the frame to report
5705 // the current match count) in case the host is waiting for a response due 5724 // the current match count) in case the host is waiting for a response due
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
6830 // event target. Potentially a Pepper plugin will receive the event. 6849 // event target. Potentially a Pepper plugin will receive the event.
6831 // In order to tell whether a plugin gets the last mouse event and which it 6850 // In order to tell whether a plugin gets the last mouse event and which it
6832 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6851 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6833 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6852 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6834 // |pepper_last_mouse_event_target_|. 6853 // |pepper_last_mouse_event_target_|.
6835 pepper_last_mouse_event_target_ = nullptr; 6854 pepper_last_mouse_event_target_ = nullptr;
6836 #endif 6855 #endif
6837 } 6856 }
6838 6857
6839 } // namespace content 6858 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/shell/browser/layout_test/blink_test_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698