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

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: Rebase + addressed some of Nasko's comments Created 6 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 | 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 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 } 2567 }
2567 } 2568 }
2568 2569
2569 // Add newly generated components into the latency info 2570 // Add newly generated components into the latency info
2570 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { 2571 for (lc = new_components.begin(); lc != new_components.end(); ++lc) {
2571 latency_info->latency_components[lc->first] = lc->second; 2572 latency_info->latency_components[lc->first] = lc->second;
2572 } 2573 }
2573 } 2574 }
2574 2575
2575 } // namespace content 2576 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698