| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 ++it) { | 277 ++it) { |
| 278 RenderWidgetHost* widget = it->second; | 278 RenderWidgetHost* widget = it->second; |
| 279 | 279 |
| 280 if (!widget->IsRenderView()) { | 280 if (!widget->IsRenderView()) { |
| 281 hosts->Add(widget); | 281 hosts->Add(widget); |
| 282 continue; | 282 continue; |
| 283 } | 283 } |
| 284 | 284 |
| 285 // Add only active RenderViewHosts. | 285 // Add only active RenderViewHosts. |
| 286 RenderViewHost* rvh = RenderViewHost::From(widget); | 286 RenderViewHost* rvh = RenderViewHost::From(widget); |
| 287 if (RenderViewHostImpl::IsRVHStateActive( | 287 if (static_cast<RenderViewHostImpl*>(rvh)->is_active()) |
| 288 static_cast<RenderViewHostImpl*>(rvh)->rvh_state())) | |
| 289 hosts->Add(widget); | 288 hosts->Add(widget); |
| 290 } | 289 } |
| 291 | 290 |
| 292 return scoped_ptr<RenderWidgetHostIterator>(hosts); | 291 return scoped_ptr<RenderWidgetHostIterator>(hosts); |
| 293 } | 292 } |
| 294 | 293 |
| 295 // static | 294 // static |
| 296 scoped_ptr<RenderWidgetHostIterator> | 295 scoped_ptr<RenderWidgetHostIterator> |
| 297 RenderWidgetHostImpl::GetAllRenderWidgetHosts() { | 296 RenderWidgetHostImpl::GetAllRenderWidgetHosts() { |
| 298 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); | 297 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); |
| (...skipping 2076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 } | 2374 } |
| 2376 #endif | 2375 #endif |
| 2377 | 2376 |
| 2378 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2377 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2379 if (view_) | 2378 if (view_) |
| 2380 return view_->PreferredReadbackFormat(); | 2379 return view_->PreferredReadbackFormat(); |
| 2381 return kN32_SkColorType; | 2380 return kN32_SkColorType; |
| 2382 } | 2381 } |
| 2383 | 2382 |
| 2384 } // namespace content | 2383 } // namespace content |
| OLD | NEW |