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

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 nits 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse, 510 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse,
511 OnVisualStateResponse) 511 OnVisualStateResponse)
512 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 512 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
513 OnRunJavaScriptMessage) 513 OnRunJavaScriptMessage)
514 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, 514 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
515 OnRunBeforeUnloadConfirm) 515 OnRunBeforeUnloadConfirm)
516 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, 516 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
517 OnDidAccessInitialDocument) 517 OnDidAccessInitialDocument)
518 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) 518 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
519 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) 519 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
520 IPC_MESSAGE_HANDLER(FrameHostMsg_DidEnforceStrictMixedContentChecking,
521 OnDidEnforceStrictMixedContentChecking)
520 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) 522 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId)
521 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, 523 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags,
522 OnDidChangeSandboxFlags) 524 OnDidChangeSandboxFlags)
523 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, 525 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties,
524 OnDidChangeFrameOwnerProperties) 526 OnDidChangeFrameOwnerProperties)
525 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) 527 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
526 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) 528 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
527 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, 529 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
528 OnBeginNavigation) 530 OnBeginNavigation)
529 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) 531 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad)
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 } 1387 }
1386 1388
1387 void RenderFrameHostImpl::OnDidChangeName(const std::string& name) { 1389 void RenderFrameHostImpl::OnDidChangeName(const std::string& name) {
1388 std::string old_name = frame_tree_node()->frame_name(); 1390 std::string old_name = frame_tree_node()->frame_name();
1389 frame_tree_node()->SetFrameName(name); 1391 frame_tree_node()->SetFrameName(name);
1390 if (old_name.empty() && !name.empty()) 1392 if (old_name.empty() && !name.empty())
1391 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); 1393 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame();
1392 delegate_->DidChangeName(this, name); 1394 delegate_->DidChangeName(this, name);
1393 } 1395 }
1394 1396
1397 void RenderFrameHostImpl::OnDidEnforceStrictMixedContentChecking() {
1398 frame_tree_node()->SetShouldEnforceStrictMixedContentChecking(true);
nasko 2015/12/17 17:16:33 Why do we have mismatched names of the methods? Th
estark 2015/12/17 22:19:10 Done.
1399 }
1400
1395 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) { 1401 void RenderFrameHostImpl::OnDidAssignPageId(int32 page_id) {
1396 // Update the RVH's current page ID so that future IPCs from the renderer 1402 // Update the RVH's current page ID so that future IPCs from the renderer
1397 // correspond to the new page. 1403 // correspond to the new page.
1398 render_view_host_->page_id_ = page_id; 1404 render_view_host_->page_id_ = page_id;
1399 } 1405 }
1400 1406
1401 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( 1407 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild(
1402 int32 child_frame_routing_id, 1408 int32 child_frame_routing_id,
1403 bad_message::BadMessageReason reason) { 1409 bad_message::BadMessageReason reason) {
1404 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( 1410 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID(
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 *dst = src; 2506 *dst = src;
2501 2507
2502 if (src.routing_id != -1) 2508 if (src.routing_id != -1)
2503 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2509 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2504 2510
2505 if (src.parent_routing_id != -1) 2511 if (src.parent_routing_id != -1)
2506 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2512 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2507 } 2513 }
2508 2514
2509 } // namespace content 2515 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698