Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 796493004: Remove FrameDetached and FrameWillClose listeners from AutofillAgent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix init order Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/public/renderer/render_frame_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 bool is_subframe = !!frame->parent(); 1988 bool is_subframe = !!frame->parent();
1989 1989
1990 Send(new FrameHostMsg_Detach(routing_id_)); 1990 Send(new FrameHostMsg_Detach(routing_id_));
1991 1991
1992 // The |is_detaching_| flag disables Send(). FrameHostMsg_Detach must be 1992 // The |is_detaching_| flag disables Send(). FrameHostMsg_Detach must be
1993 // sent before setting |is_detaching_| to true. In contrast, Observers 1993 // sent before setting |is_detaching_| to true. In contrast, Observers
1994 // should only be notified afterwards so they cannot call back into here and 1994 // should only be notified afterwards so they cannot call back into here and
1995 // have IPCs fired off. 1995 // have IPCs fired off.
1996 is_detaching_ = true; 1996 is_detaching_ = true;
1997 1997
1998 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, FrameDetached());
1998 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(), 1999 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers(),
1999 FrameDetached(frame)); 2000 FrameDetached(frame));
2000 2001
2001 // We need to clean up subframes by removing them from the map and deleting 2002 // We need to clean up subframes by removing them from the map and deleting
2002 // the RenderFrameImpl. In contrast, the main frame is owned by its 2003 // the RenderFrameImpl. In contrast, the main frame is owned by its
2003 // containing RenderViewHost (so that they have the same lifetime), so only 2004 // containing RenderViewHost (so that they have the same lifetime), so only
2004 // removal from the map is needed and no deletion. 2005 // removal from the map is needed and no deletion.
2005 FrameMap::iterator it = g_frame_map.Get().find(frame); 2006 FrameMap::iterator it = g_frame_map.Get().find(frame);
2006 CHECK(it != g_frame_map.Get().end()); 2007 CHECK(it != g_frame_map.Get().end());
2007 CHECK_EQ(it->second, this); 2008 CHECK_EQ(it->second, this);
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4315 4316
4316 #if defined(ENABLE_BROWSER_CDMS) 4317 #if defined(ENABLE_BROWSER_CDMS)
4317 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4318 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4318 if (!cdm_manager_) 4319 if (!cdm_manager_)
4319 cdm_manager_ = new RendererCdmManager(this); 4320 cdm_manager_ = new RendererCdmManager(this);
4320 return cdm_manager_; 4321 return cdm_manager_;
4321 } 4322 }
4322 #endif // defined(ENABLE_BROWSER_CDMS) 4323 #endif // defined(ENABLE_BROWSER_CDMS)
4323 4324
4324 } // namespace content 4325 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698