| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |