Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy_host.h" | 5 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "content/browser/frame_host/cross_process_frame_connector.h" | 8 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 9 #include "content/browser/frame_host/frame_tree.h" | 9 #include "content/browser/frame_host/frame_tree.h" |
| 10 #include "content/browser/frame_host/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 return GetProcess()->Send(msg); | 109 return GetProcess()->Send(msg); |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { | 112 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { |
| 113 if (cross_process_frame_connector_.get() && | 113 if (cross_process_frame_connector_.get() && |
| 114 cross_process_frame_connector_->OnMessageReceived(msg)) | 114 cross_process_frame_connector_->OnMessageReceived(msg)) |
| 115 return true; | 115 return true; |
| 116 | 116 |
| 117 bool handled = true; | 117 bool handled = true; |
| 118 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg) | 118 IPC_BEGIN_MESSAGE_MAP(RenderFrameProxyHost, msg) |
| 119 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) | |
| 119 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) | 120 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) |
| 120 IPC_MESSAGE_UNHANDLED(handled = false) | 121 IPC_MESSAGE_UNHANDLED(handled = false) |
| 121 IPC_END_MESSAGE_MAP() | 122 IPC_END_MESSAGE_MAP() |
| 122 return handled; | 123 return handled; |
| 123 } | 124 } |
| 124 | 125 |
| 125 bool RenderFrameProxyHost::InitRenderFrameProxy() { | 126 bool RenderFrameProxyHost::InitRenderFrameProxy() { |
| 126 DCHECK(!render_frame_proxy_created_); | 127 DCHECK(!render_frame_proxy_created_); |
| 127 // The process may (if we're sharing a process with another host that already | 128 // The process may (if we're sharing a process with another host that already |
| 128 // initialized it) or may not (we have our own process or the old process | 129 // initialized it) or may not (we have our own process or the old process |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 150 ->current_replication_state())); | 151 ->current_replication_state())); |
| 151 | 152 |
| 152 render_frame_proxy_created_ = true; | 153 render_frame_proxy_created_ = true; |
| 153 return true; | 154 return true; |
| 154 } | 155 } |
| 155 | 156 |
| 156 void RenderFrameProxyHost::DisownOpener() { | 157 void RenderFrameProxyHost::DisownOpener() { |
| 157 Send(new FrameMsg_DisownOpener(GetRoutingID())); | 158 Send(new FrameMsg_DisownOpener(GetRoutingID())); |
| 158 } | 159 } |
| 159 | 160 |
| 161 void RenderFrameProxyHost::OnDetach() { | |
|
ncarter (slow)
2015/03/27 22:03:46
Do we need to apply some filtering here?
Seems li
Charlie Reis
2015/03/28 00:09:18
This is an excellent point. Unfortunately, it's a
| |
| 162 frame_tree_node_->frame_tree()->RemoveFrame(frame_tree_node_); | |
| 163 } | |
| 164 | |
| 160 void RenderFrameProxyHost::OnOpenURL( | 165 void RenderFrameProxyHost::OnOpenURL( |
| 161 const FrameHostMsg_OpenURL_Params& params) { | 166 const FrameHostMsg_OpenURL_Params& params) { |
| 162 frame_tree_node_->current_frame_host()->OpenURL(params, site_instance_.get()); | 167 frame_tree_node_->current_frame_host()->OpenURL(params, site_instance_.get()); |
| 163 } | 168 } |
| 164 | 169 |
| 165 } // namespace content | 170 } // namespace content |
| OLD | NEW |