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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 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 | 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 ++it) { 304 ++it) {
305 RenderWidgetHost* widget = it->second; 305 RenderWidgetHost* widget = it->second;
306 306
307 if (!widget->IsRenderView()) { 307 if (!widget->IsRenderView()) {
308 hosts->Add(widget); 308 hosts->Add(widget);
309 continue; 309 continue;
310 } 310 }
311 311
312 // Add only active RenderViewHosts. 312 // Add only active RenderViewHosts.
313 RenderViewHost* rvh = RenderViewHost::From(widget); 313 RenderViewHost* rvh = RenderViewHost::From(widget);
314 if (!static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out()) 314 if (RenderViewHostImpl::IsRVHStateActive(
315 static_cast<RenderViewHostImpl*>(rvh)->rvh_state()))
315 hosts->Add(widget); 316 hosts->Add(widget);
316 } 317 }
317 318
318 return scoped_ptr<RenderWidgetHostIterator>(hosts); 319 return scoped_ptr<RenderWidgetHostIterator>(hosts);
319 } 320 }
320 321
321 // static 322 // static
322 scoped_ptr<RenderWidgetHostIterator> 323 scoped_ptr<RenderWidgetHostIterator>
323 RenderWidgetHostImpl::GetAllRenderWidgetHosts() { 324 RenderWidgetHostImpl::GetAllRenderWidgetHosts() {
324 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); 325 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl();
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 } 2546 }
2546 } 2547 }
2547 2548
2548 // Add newly generated components into the latency info 2549 // Add newly generated components into the latency info
2549 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { 2550 for (lc = new_components.begin(); lc != new_components.end(); ++lc) {
2550 latency_info->latency_components[lc->first] = lc->second; 2551 latency_info->latency_components[lc->first] = lc->second;
2551 } 2552 }
2552 } 2553 }
2553 2554
2554 } // namespace content 2555 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_unittest.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698