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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, | 534 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, |
535 OnRunJavaScriptMessage) | 535 OnRunJavaScriptMessage) |
536 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 536 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
537 OnRunBeforeUnloadConfirm) | 537 OnRunBeforeUnloadConfirm) |
538 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 538 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
539 OnDidAccessInitialDocument) | 539 OnDidAccessInitialDocument) |
540 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 540 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
541 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 541 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
542 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, | 542 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, |
543 OnEnforceStrictMixedContentChecking) | 543 OnEnforceStrictMixedContentChecking) |
| 544 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
| 545 OnUpdateToUniqueOrigin) |
544 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) | 546 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) |
545 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 547 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
546 OnDidChangeSandboxFlags) | 548 OnDidChangeSandboxFlags) |
547 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
548 OnDidChangeFrameOwnerProperties) | 550 OnDidChangeFrameOwnerProperties) |
549 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 551 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
550 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 552 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
551 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 553 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
552 OnBeginNavigation) | 554 OnBeginNavigation) |
553 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) | 555 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 frame_tree_node()->SetFrameName(name, unique_name); | 1474 frame_tree_node()->SetFrameName(name, unique_name); |
1473 if (old_name.empty() && !name.empty()) | 1475 if (old_name.empty() && !name.empty()) |
1474 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1476 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
1475 delegate_->DidChangeName(this, name); | 1477 delegate_->DidChangeName(this, name); |
1476 } | 1478 } |
1477 | 1479 |
1478 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { | 1480 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { |
1479 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); | 1481 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); |
1480 } | 1482 } |
1481 | 1483 |
| 1484 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( |
| 1485 bool is_potentially_trustworthy_unique_origin) { |
| 1486 url::Origin origin; |
| 1487 DCHECK(origin.unique()); |
| 1488 frame_tree_node()->SetCurrentOrigin(origin, |
| 1489 is_potentially_trustworthy_unique_origin); |
| 1490 } |
| 1491 |
1482 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { | 1492 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { |
1483 // Update the RVH's current page ID so that future IPCs from the renderer | 1493 // Update the RVH's current page ID so that future IPCs from the renderer |
1484 // correspond to the new page. | 1494 // correspond to the new page. |
1485 render_view_host_->page_id_ = page_id; | 1495 render_view_host_->page_id_ = page_id; |
1486 } | 1496 } |
1487 | 1497 |
1488 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( | 1498 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( |
1489 int32_t child_frame_routing_id, | 1499 int32_t child_frame_routing_id, |
1490 bad_message::BadMessageReason reason) { | 1500 bad_message::BadMessageReason reason) { |
1491 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( | 1501 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 2716 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
2707 if (!focused_frame_tree_node) | 2717 if (!focused_frame_tree_node) |
2708 return; | 2718 return; |
2709 RenderFrameHostImpl* focused_frame = | 2719 RenderFrameHostImpl* focused_frame = |
2710 focused_frame_tree_node->current_frame_host(); | 2720 focused_frame_tree_node->current_frame_host(); |
2711 DCHECK(focused_frame); | 2721 DCHECK(focused_frame); |
2712 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 2722 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
2713 } | 2723 } |
2714 | 2724 |
2715 } // namespace content | 2725 } // namespace content |
OLD | NEW |