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

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

Issue 82033002: Always create FrameTreeNodes and RenderFrameHosts for every frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix two bugs with slow/crashed renderers; add tests Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3160 // opener after hearing about it from the browser, and the browser does not 3160 // opener after hearing about it from the browser, and the browser does not
3161 // (yet) care about subframe openers. 3161 // (yet) care about subframe openers.
3162 if (is_swapped_out_ || frame->parent()) 3162 if (is_swapped_out_ || frame->parent())
3163 return; 3163 return;
3164 3164
3165 // Notify WebContents and all its swapped out RenderViews. 3165 // Notify WebContents and all its swapped out RenderViews.
3166 Send(new ViewHostMsg_DidDisownOpener(routing_id_)); 3166 Send(new ViewHostMsg_DidDisownOpener(routing_id_));
3167 } 3167 }
3168 3168
3169 void RenderViewImpl::frameDetached(WebFrame* frame) { 3169 void RenderViewImpl::frameDetached(WebFrame* frame) {
3170 // NOTE: We may get here for either the main frame or for subframes. The
3171 // RenderFrameImpl will be deleted immediately after this call for subframes
3172 // but not for the main frame, which is kept around in a scoped_ptr.
3173
3170 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameDetached(frame)); 3174 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameDetached(frame));
3171 } 3175 }
3172 3176
3173 void RenderViewImpl::willClose(WebFrame* frame) { 3177 void RenderViewImpl::willClose(WebFrame* frame) {
3174 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameWillClose(frame)); 3178 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameWillClose(frame));
3175 } 3179 }
3176 3180
3177 void RenderViewImpl::didMatchCSS( 3181 void RenderViewImpl::didMatchCSS(
3178 WebFrame* frame, 3182 WebFrame* frame,
3179 const WebVector<WebString>& newly_matching_selectors, 3183 const WebVector<WebString>& newly_matching_selectors,
(...skipping 3499 matching lines...) Expand 10 before | Expand all | Expand 10 after
6679 for (size_t i = 0; i < icon_urls.size(); i++) { 6683 for (size_t i = 0; i < icon_urls.size(); i++) {
6680 WebURL url = icon_urls[i].iconURL(); 6684 WebURL url = icon_urls[i].iconURL();
6681 if (!url.isEmpty()) 6685 if (!url.isEmpty())
6682 urls.push_back(FaviconURL(url, 6686 urls.push_back(FaviconURL(url,
6683 ToFaviconType(icon_urls[i].iconType()))); 6687 ToFaviconType(icon_urls[i].iconType())));
6684 } 6688 }
6685 SendUpdateFaviconURL(urls); 6689 SendUpdateFaviconURL(urls);
6686 } 6690 }
6687 6691
6688 } // namespace content 6692 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698