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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoad, | 475 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoad, |
476 OnDidStartProvisionalLoad) | 476 OnDidStartProvisionalLoad) |
477 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError, | 477 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError, |
478 OnDidFailProvisionalLoadWithError) | 478 OnDidFailProvisionalLoadWithError) |
479 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError, | 479 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError, |
480 OnDidFailLoadWithError) | 480 OnDidFailLoadWithError) |
481 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad, | 481 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad, |
482 OnDidCommitProvisionalLoad(msg)) | 482 OnDidCommitProvisionalLoad(msg)) |
483 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDropNavigation, OnDidDropNavigation) | 483 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDropNavigation, OnDidDropNavigation) |
484 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateState, OnUpdateState) | 484 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateState, OnUpdateState) |
| 485 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigateNewChildFrame, |
| 486 OnNavigateNewChildFrame) |
485 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) | 487 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) |
486 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted, | 488 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted, |
487 OnDocumentOnLoadCompleted) | 489 OnDocumentOnLoadCompleted) |
488 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK) | 490 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK) |
489 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK) | 491 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK) |
490 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu) | 492 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu) |
491 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse, | 493 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse, |
492 OnJavaScriptExecuteResponse) | 494 OnJavaScriptExecuteResponse) |
493 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse, | 495 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse, |
494 OnVisualStateResponse) | 496 OnVisualStateResponse) |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 // TODO(creis): Move CanAccessFilesOfPageState to RenderFrameHostImpl. | 1005 // TODO(creis): Move CanAccessFilesOfPageState to RenderFrameHostImpl. |
1004 if (!render_view_host_->CanAccessFilesOfPageState(state)) { | 1006 if (!render_view_host_->CanAccessFilesOfPageState(state)) { |
1005 bad_message::ReceivedBadMessage( | 1007 bad_message::ReceivedBadMessage( |
1006 GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE); | 1008 GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE); |
1007 return; | 1009 return; |
1008 } | 1010 } |
1009 | 1011 |
1010 delegate_->UpdateStateForFrame(this, state); | 1012 delegate_->UpdateStateForFrame(this, state); |
1011 } | 1013 } |
1012 | 1014 |
| 1015 void RenderFrameHostImpl::OnNavigateNewChildFrame( |
| 1016 const std::string& unique_name) { |
| 1017 frame_tree_node_->navigator()->NavigateNewChildFrame(this, unique_name); |
| 1018 } |
| 1019 |
1013 RenderWidgetHostImpl* RenderFrameHostImpl::GetRenderWidgetHost() { | 1020 RenderWidgetHostImpl* RenderFrameHostImpl::GetRenderWidgetHost() { |
1014 return render_widget_host_; | 1021 return render_widget_host_; |
1015 } | 1022 } |
1016 | 1023 |
1017 RenderWidgetHostView* RenderFrameHostImpl::GetView() { | 1024 RenderWidgetHostView* RenderFrameHostImpl::GetView() { |
1018 RenderFrameHostImpl* frame = this; | 1025 RenderFrameHostImpl* frame = this; |
1019 while (frame) { | 1026 while (frame) { |
1020 if (frame->render_widget_host_) | 1027 if (frame->render_widget_host_) |
1021 return frame->render_widget_host_->GetView(); | 1028 return frame->render_widget_host_->GetView(); |
1022 frame = static_cast<RenderFrameHostImpl*>(frame->GetParent()); | 1029 frame = static_cast<RenderFrameHostImpl*>(frame->GetParent()); |
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 *dst = src; | 2385 *dst = src; |
2379 | 2386 |
2380 if (src.routing_id != -1) | 2387 if (src.routing_id != -1) |
2381 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2388 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2382 | 2389 |
2383 if (src.parent_routing_id != -1) | 2390 if (src.parent_routing_id != -1) |
2384 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2391 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2385 } | 2392 } |
2386 | 2393 |
2387 } // namespace content | 2394 } // namespace content |
OLD | NEW |