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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 ++it) { | 306 ++it) { |
307 RenderWidgetHost* widget = it->second; | 307 RenderWidgetHost* widget = it->second; |
308 | 308 |
309 if (!widget->IsRenderView()) { | 309 if (!widget->IsRenderView()) { |
310 hosts->Add(widget); | 310 hosts->Add(widget); |
311 continue; | 311 continue; |
312 } | 312 } |
313 | 313 |
314 // Add only active RenderViewHosts. | 314 // Add only active RenderViewHosts. |
315 RenderViewHost* rvh = RenderViewHost::From(widget); | 315 RenderViewHost* rvh = RenderViewHost::From(widget); |
316 if (!static_cast<RenderViewHostImpl*>(rvh)->is_swapped_out()) | 316 if (RenderViewHostImpl::IsRVHStateActive( |
| 317 static_cast<RenderViewHostImpl*>(rvh)->rvh_state())) |
317 hosts->Add(widget); | 318 hosts->Add(widget); |
318 } | 319 } |
319 | 320 |
320 return scoped_ptr<RenderWidgetHostIterator>(hosts); | 321 return scoped_ptr<RenderWidgetHostIterator>(hosts); |
321 } | 322 } |
322 | 323 |
323 // static | 324 // static |
324 scoped_ptr<RenderWidgetHostIterator> | 325 scoped_ptr<RenderWidgetHostIterator> |
325 RenderWidgetHostImpl::GetAllRenderWidgetHosts() { | 326 RenderWidgetHostImpl::GetAllRenderWidgetHosts() { |
326 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); | 327 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2528 } | 2529 } |
2529 } | 2530 } |
2530 | 2531 |
2531 // Add newly generated components into the latency info | 2532 // Add newly generated components into the latency info |
2532 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { | 2533 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { |
2533 latency_info->latency_components[lc->first] = lc->second; | 2534 latency_info->latency_components[lc->first] = lc->second; |
2534 } | 2535 } |
2535 } | 2536 } |
2536 | 2537 |
2537 } // namespace content | 2538 } // namespace content |
OLD | NEW |