| 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/renderer/render_frame_proxy.h" | 5 #include "content/renderer/render_frame_proxy.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "content/child/webmessageportchannel_impl.h" | 10 #include "content/child/webmessageportchannel_impl.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 void RenderFrameProxy::OnDidUpdateName(const std::string& name) { | 303 void RenderFrameProxy::OnDidUpdateName(const std::string& name) { |
| 304 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name)); | 304 web_frame_->setReplicatedName(blink::WebString::fromUTF8(name)); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void RenderFrameProxy::OnDidUpdateOrigin(const url::Origin& origin) { | 307 void RenderFrameProxy::OnDidUpdateOrigin(const url::Origin& origin) { |
| 308 web_frame_->setReplicatedOrigin(blink::WebSecurityOrigin::createFromString( | 308 web_frame_->setReplicatedOrigin(blink::WebSecurityOrigin::createFromString( |
| 309 blink::WebString::fromUTF8(origin.string()))); | 309 blink::WebString::fromUTF8(origin.string()))); |
| 310 } | 310 } |
| 311 | 311 |
| 312 void RenderFrameProxy::frameDetached() { | 312 void RenderFrameProxy::frameDetached() { |
| 313 if (web_frame_->parent()) { | 313 frameDetached(false); |
| 314 } |
| 315 |
| 316 void RenderFrameProxy::frameDetached(bool for_replacement) { |
| 317 if (!for_replacement && web_frame_->parent()) { |
| 314 web_frame_->parent()->removeChild(web_frame_); | 318 web_frame_->parent()->removeChild(web_frame_); |
| 315 | 319 |
| 316 // Let the browser process know this subframe is removed, so that it is | 320 // Let the browser process know this subframe is removed, so that it is |
| 317 // destroyed in its current process. | 321 // destroyed in its current process. |
| 318 Send(new FrameHostMsg_Detach(routing_id_)); | 322 Send(new FrameHostMsg_Detach(routing_id_)); |
| 319 } | 323 } |
| 320 | 324 |
| 321 web_frame_->close(); | 325 web_frame_->close(); |
| 322 | 326 |
| 323 // Remove the entry in the WebFrame->RenderFrameProxy map, as the |web_frame_| | 327 // Remove the entry in the WebFrame->RenderFrameProxy map, as the |web_frame_| |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 blink::WebUserGestureIndicator::isProcessingUserGesture(); | 388 blink::WebUserGestureIndicator::isProcessingUserGesture(); |
| 385 blink::WebUserGestureIndicator::consumeUserGesture(); | 389 blink::WebUserGestureIndicator::consumeUserGesture(); |
| 386 Send(new FrameHostMsg_OpenURL(routing_id_, params)); | 390 Send(new FrameHostMsg_OpenURL(routing_id_, params)); |
| 387 } | 391 } |
| 388 | 392 |
| 389 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { | 393 void RenderFrameProxy::forwardInputEvent(const blink::WebInputEvent* event) { |
| 390 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); | 394 Send(new FrameHostMsg_ForwardInputEvent(routing_id_, event)); |
| 391 } | 395 } |
| 392 | 396 |
| 393 } // namespace | 397 } // namespace |
| OLD | NEW |