Chromium Code Reviews| 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 723 | 723 |
| 724 RenderFrameImpl::~RenderFrameImpl() { | 724 RenderFrameImpl::~RenderFrameImpl() { |
| 725 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); | 725 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, RenderFrameGone()); |
| 726 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct()); | 726 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, OnDestruct()); |
| 727 | 727 |
| 728 #if defined(VIDEO_HOLE) | 728 #if defined(VIDEO_HOLE) |
| 729 if (contains_media_player_) | 729 if (contains_media_player_) |
| 730 render_view_->UnregisterVideoHoleFrame(this); | 730 render_view_->UnregisterVideoHoleFrame(this); |
| 731 #endif | 731 #endif |
| 732 | 732 |
| 733 if (render_frame_proxy_) | 733 // RenderFrameProxy is only "owned" by RenderFrameImpl in the case it is the |
| 734 delete render_frame_proxy_; | 734 // main frame. Ensure it is deleted along with this object. |
| 735 if (!is_subframe_ && render_frame_proxy_) | |
|
ncarter (slow)
2015/05/07 23:33:36
I was initially worried that this frameDetached ca
nasko
2015/05/07 23:46:05
I did at the subframe check exactly to guard again
| |
| 736 render_frame_proxy_->frameDetached(); | |
|
ncarter (slow)
2015/05/07 23:33:36
Gosh it's kinda gross that the rfph dtor calls bac
nasko
2015/05/07 23:46:05
I'm hopeful that the CL I'm working on is going to
| |
| 735 | 737 |
| 736 render_view_->UnregisterRenderFrame(this); | 738 render_view_->UnregisterRenderFrame(this); |
| 737 g_routing_id_frame_map.Get().erase(routing_id_); | 739 g_routing_id_frame_map.Get().erase(routing_id_); |
| 738 RenderThread::Get()->RemoveRoute(routing_id_); | 740 RenderThread::Get()->RemoveRoute(routing_id_); |
| 739 } | 741 } |
| 740 | 742 |
| 741 void RenderFrameImpl::SetWebFrame(blink::WebLocalFrame* web_frame) { | 743 void RenderFrameImpl::SetWebFrame(blink::WebLocalFrame* web_frame) { |
| 742 DCHECK(!frame_); | 744 DCHECK(!frame_); |
| 743 | 745 |
| 744 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( | 746 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( |
| (...skipping 4187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4932 #elif defined(ENABLE_BROWSER_CDMS) | 4934 #elif defined(ENABLE_BROWSER_CDMS) |
| 4933 cdm_manager_, | 4935 cdm_manager_, |
| 4934 #endif | 4936 #endif |
| 4935 this); | 4937 this); |
| 4936 } | 4938 } |
| 4937 | 4939 |
| 4938 return cdm_factory_; | 4940 return cdm_factory_; |
| 4939 } | 4941 } |
| 4940 | 4942 |
| 4941 } // namespace content | 4943 } // namespace content |
| OLD | NEW |