| 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/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "content/browser/frame_host/cross_process_frame_connector.h" | 9 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { | 108 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { |
| 109 if (delegate_->OnMessageReceived(this, msg)) | 109 if (delegate_->OnMessageReceived(this, msg)) |
| 110 return true; | 110 return true; |
| 111 | 111 |
| 112 bool handled = true; | 112 bool handled = true; |
| 113 bool msg_is_ok = true; | 113 bool msg_is_ok = true; |
| 114 IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameHostImpl, msg, msg_is_ok) | 114 IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameHostImpl, msg, msg_is_ok) |
| 115 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) | 115 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) |
| 116 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, | 116 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, |
| 117 OnDidStartProvisionalLoadForFrame) | 117 OnDidStartProvisionalLoadForFrame) |
| 118 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError, |
| 119 OnDidFailProvisionalLoadWithError) |
| 118 IPC_END_MESSAGE_MAP_EX() | 120 IPC_END_MESSAGE_MAP_EX() |
| 119 | 121 |
| 120 if (!msg_is_ok) { | 122 if (!msg_is_ok) { |
| 121 // The message had a handler, but its de-serialization failed. | 123 // The message had a handler, but its de-serialization failed. |
| 122 // Kill the renderer. | 124 // Kill the renderer. |
| 123 RecordAction(UserMetricsAction("BadMessageTerminate_RFH")); | 125 RecordAction(UserMetricsAction("BadMessageTerminate_RFH")); |
| 124 GetProcess()->ReceivedBadMessage(); | 126 GetProcess()->ReceivedBadMessage(); |
| 125 } | 127 } |
| 126 | 128 |
| 127 return handled; | 129 return handled; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 147 | 149 |
| 148 void RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame( | 150 void RenderFrameHostImpl::OnDidStartProvisionalLoadForFrame( |
| 149 int64 frame_id, | 151 int64 frame_id, |
| 150 int64 parent_frame_id, | 152 int64 parent_frame_id, |
| 151 bool is_main_frame, | 153 bool is_main_frame, |
| 152 const GURL& url) { | 154 const GURL& url) { |
| 153 frame_tree_node_->navigator()->DidStartProvisionalLoad( | 155 frame_tree_node_->navigator()->DidStartProvisionalLoad( |
| 154 this, frame_id, parent_frame_id, is_main_frame, url); | 156 this, frame_id, parent_frame_id, is_main_frame, url); |
| 155 } | 157 } |
| 156 | 158 |
| 159 void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( |
| 160 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { |
| 161 frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); |
| 162 } |
| 163 |
| 157 } // namespace content | 164 } // namespace content |
| OLD | NEW |