| 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_SetUniqueOriginPotentiallyTrustworthy, |
| 549 OnSetUniqueOriginPotentiallyTrustworthy) |
| 548 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) | 550 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) |
| 549 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 551 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
| 550 OnDidChangeSandboxFlags) | 552 OnDidChangeSandboxFlags) |
| 551 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 553 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
| 552 OnDidChangeFrameOwnerProperties) | 554 OnDidChangeFrameOwnerProperties) |
| 553 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 555 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
| 554 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 556 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
| 555 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 557 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
| 556 OnBeginNavigation) | 558 OnBeginNavigation) |
| 557 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) | 559 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); | 1470 frame_tree_node()->SetFrameName(name, unique_name); |
| 1469 if (old_name.empty() && !name.empty()) | 1471 if (old_name.empty() && !name.empty()) |
| 1470 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1472 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
| 1471 delegate_->DidChangeName(this, name); | 1473 delegate_->DidChangeName(this, name); |
| 1472 } | 1474 } |
| 1473 | 1475 |
| 1474 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { | 1476 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { |
| 1475 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); | 1477 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); |
| 1476 } | 1478 } |
| 1477 | 1479 |
| 1480 void RenderFrameHostImpl::OnSetUniqueOriginPotentiallyTrustworthy() { |
| 1481 frame_tree_node()->SetUniqueOriginPotentiallyTrustworthy(true); |
| 1482 } |
| 1483 |
| 1478 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { | 1484 void RenderFrameHostImpl::OnDidAssignPageId(int32_t page_id) { |
| 1479 // Update the RVH's current page ID so that future IPCs from the renderer | 1485 // Update the RVH's current page ID so that future IPCs from the renderer |
| 1480 // correspond to the new page. | 1486 // correspond to the new page. |
| 1481 render_view_host_->page_id_ = page_id; | 1487 render_view_host_->page_id_ = page_id; |
| 1482 } | 1488 } |
| 1483 | 1489 |
| 1484 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( | 1490 FrameTreeNode* RenderFrameHostImpl::FindAndVerifyChild( |
| 1485 int32_t child_frame_routing_id, | 1491 int32_t child_frame_routing_id, |
| 1486 bad_message::BadMessageReason reason) { | 1492 bad_message::BadMessageReason reason) { |
| 1487 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( | 1493 FrameTreeNode* child = frame_tree_node()->frame_tree()->FindByRoutingID( |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2631 *dst = src; | 2637 *dst = src; |
| 2632 | 2638 |
| 2633 if (src.routing_id != -1) | 2639 if (src.routing_id != -1) |
| 2634 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2640 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
| 2635 | 2641 |
| 2636 if (src.parent_routing_id != -1) | 2642 if (src.parent_routing_id != -1) |
| 2637 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2643 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 2638 } | 2644 } |
| 2639 | 2645 |
| 2640 } // namespace content | 2646 } // namespace content |
| OLD | NEW |