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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1489253002: Plumb document's strict mixed content checking for RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alexmos comments Created 5 years 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse, 501 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse,
502 OnVisualStateResponse) 502 OnVisualStateResponse)
503 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 503 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
504 OnRunJavaScriptMessage) 504 OnRunJavaScriptMessage)
505 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, 505 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
506 OnRunBeforeUnloadConfirm) 506 OnRunBeforeUnloadConfirm)
507 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, 507 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
508 OnDidAccessInitialDocument) 508 OnDidAccessInitialDocument)
509 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) 509 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
510 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) 510 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
511 IPC_MESSAGE_HANDLER(FrameHostMsg_DidEnforceStrictMixedContentChecking,
512 OnDidEnforceStrictMixedContentChecking)
511 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) 513 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId)
512 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, 514 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags,
513 OnDidChangeSandboxFlags) 515 OnDidChangeSandboxFlags)
514 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, 516 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties,
515 OnDidChangeFrameOwnerProperties) 517 OnDidChangeFrameOwnerProperties)
516 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) 518 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
517 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) 519 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
518 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, 520 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
519 OnBeginNavigation) 521 OnBeginNavigation)
520 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) 522 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad)
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 } 1366 }
1365 1367
1366 void RenderFrameHostImpl::OnDidChangeName(const std::string& name) { 1368 void RenderFrameHostImpl::OnDidChangeName(const std::string& name) {
1367 std::string old_name = frame_tree_node()->frame_name(); 1369 std::string old_name = frame_tree_node()->frame_name();
1368 frame_tree_node()->SetFrameName(name); 1370 frame_tree_node()->SetFrameName(name);
1369 if (old_name.empty() && !name.empty()) 1371 if (old_name.empty() && !name.empty())
1370 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); 1372 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame();
1371 delegate_->DidChangeName(this, name); 1373 delegate_->DidChangeName(this, name);
1372 } 1374 }
1373 1375
1376 void RenderFrameHostImpl::OnDidEnforceStrictMixedContentChecking() {
1377 frame_tree_node()->SetShouldEnforceStrictMixedContentChecking(true);
1378 }
1379
1374 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { 1380 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) {
1375 // Update the RVH's current page ID so that future IPCs from the renderer 1381 // Update the RVH's current page ID so that future IPCs from the renderer
1376 // correspond to the new page. 1382 // correspond to the new page.
1377 render_view_host_->page_id_ = page_id; 1383 render_view_host_->page_id_ = page_id;
1378 } 1384 }
1379 1385
1380 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( 1386 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild(
1381 int32 child_frame_routing_id, 1387 int32 child_frame_routing_id,
1382 bad_message::BadMessageReason reason) { 1388 bad_message::BadMessageReason reason) {
1383 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( 1389 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID(
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 *dst = src; 2397 *dst = src;
2392 2398
2393 if (src.routing_id != -1) 2399 if (src.routing_id != -1)
2394 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2400 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2395 2401
2396 if (src.parent_routing_id != -1) 2402 if (src.parent_routing_id != -1)
2397 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2403 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2398 } 2404 }
2399 2405
2400 } // namespace content 2406 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698