| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 virtual ~RenderWidgetHostIteratorImpl() { | 127 virtual ~RenderWidgetHostIteratorImpl() { |
| 128 } | 128 } |
| 129 | 129 |
| 130 void Add(RenderWidgetHost* host) { | 130 void Add(RenderWidgetHost* host) { |
| 131 hosts_.push_back(RenderWidgetHostID(host->GetProcess()->GetID(), | 131 hosts_.push_back(RenderWidgetHostID(host->GetProcess()->GetID(), |
| 132 host->GetRoutingID())); | 132 host->GetRoutingID())); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // RenderWidgetHostIterator: | 135 // RenderWidgetHostIterator: |
| 136 virtual RenderWidgetHost* GetNextHost() OVERRIDE { | 136 virtual RenderWidgetHost* GetNextHost() override { |
| 137 RenderWidgetHost* host = NULL; | 137 RenderWidgetHost* host = NULL; |
| 138 while (current_index_ < hosts_.size() && !host) { | 138 while (current_index_ < hosts_.size() && !host) { |
| 139 RenderWidgetHostID id = hosts_[current_index_]; | 139 RenderWidgetHostID id = hosts_[current_index_]; |
| 140 host = RenderWidgetHost::FromID(id.first, id.second); | 140 host = RenderWidgetHost::FromID(id.first, id.second); |
| 141 ++current_index_; | 141 ++current_index_; |
| 142 } | 142 } |
| 143 return host; | 143 return host; |
| 144 } | 144 } |
| 145 | 145 |
| 146 private: | 146 private: |
| (...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 } | 2395 } |
| 2396 #endif | 2396 #endif |
| 2397 | 2397 |
| 2398 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2398 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2399 if (view_) | 2399 if (view_) |
| 2400 return view_->PreferredReadbackFormat(); | 2400 return view_->PreferredReadbackFormat(); |
| 2401 return kN32_SkColorType; | 2401 return kN32_SkColorType; |
| 2402 } | 2402 } |
| 2403 | 2403 |
| 2404 } // namespace content | 2404 } // namespace content |
| OLD | NEW |