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/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/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, | 538 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, |
539 OnRunJavaScriptMessage) | 539 OnRunJavaScriptMessage) |
540 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 540 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
541 OnRunBeforeUnloadConfirm) | 541 OnRunBeforeUnloadConfirm) |
542 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 542 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
543 OnDidAccessInitialDocument) | 543 OnDidAccessInitialDocument) |
544 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 544 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
545 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 545 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
546 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, | 546 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, |
547 OnEnforceStrictMixedContentChecking) | 547 OnEnforceStrictMixedContentChecking) |
548 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateOrigin, OnUpdateOrigin) | |
548 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) | 549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) |
549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 550 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
550 OnDidChangeSandboxFlags) | 551 OnDidChangeSandboxFlags) |
551 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 552 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
552 OnDidChangeFrameOwnerProperties) | 553 OnDidChangeFrameOwnerProperties) |
553 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 554 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
554 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 555 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
555 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 556 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
556 OnBeginNavigation) | 557 OnBeginNavigation) |
557 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) | 558 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1468 frame_tree_node()->SetFrameName(name, unique_name); | 1469 frame_tree_node()->SetFrameName(name, unique_name); |
1469 if (old_name.empty() && !name.empty()) | 1470 if (old_name.empty() && !name.empty()) |
1470 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1471 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
1471 delegate_->DidChangeName(this, name); | 1472 delegate_->DidChangeName(this, name); |
1472 } | 1473 } |
1473 | 1474 |
1474 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { | 1475 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { |
1475 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); | 1476 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); |
1476 } | 1477 } |
1477 | 1478 |
1479 void RenderFrameHostImpl::OnUpdateOrigin( | |
1480 const url::Origin& origin, | |
1481 bool is_potentially_trustworthy_unique_origin) { | |
1482 frame_tree_node()->SetCurrentOrigin(origin, | |
alexmos
2016/03/14 22:20:36
I know this is temporary until we fix issue 594645
estark
2016/03/15 01:04:41
Oh, I wasn't aware that we were already validating
| |
1483 is_potentially_trustworthy_unique_origin); | |
1484 } | |
1485 | |
1478 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { | 1486 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { |
1479 // Update the RVH's current page ID so that future IPCs from the renderer | 1487 // Update the RVH's current page ID so that future IPCs from the renderer |
1480 // correspond to the new page. | 1488 // correspond to the new page. |
1481 render_view_host_->page_id_ = page_id; | 1489 render_view_host_->page_id_ = page_id; |
1482 } | 1490 } |
1483 | 1491 |
1484 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( | 1492 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( |
1485 int32_t child_frame_routing_id, | 1493 int32_t child_frame_routing_id, |
1486 bad_message::BadMessageReason reason) { | 1494 bad_message::BadMessageReason reason) { |
1487 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( | 1495 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2631 *dst = src; | 2639 *dst = src; |
2632 | 2640 |
2633 if (src.routing_id != -1) | 2641 if (src.routing_id != -1) |
2634 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2642 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2635 | 2643 |
2636 if (src.parent_routing_id != -1) | 2644 if (src.parent_routing_id != -1) |
2637 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2645 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2638 } | 2646 } |
2639 | 2647 |
2640 } // namespace content | 2648 } // namespace content |
OLD | NEW |