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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 RenderWidgetHost* RenderWidgetHost::FromID( | 278 RenderWidgetHost* RenderWidgetHost::FromID( |
279 int32 process_id, | 279 int32 process_id, |
280 int32 routing_id) { | 280 int32 routing_id) { |
281 return RenderWidgetHostImpl::FromID(process_id, routing_id); | 281 return RenderWidgetHostImpl::FromID(process_id, routing_id); |
282 } | 282 } |
283 | 283 |
284 // static | 284 // static |
285 RenderWidgetHostImpl* RenderWidgetHostImpl::FromID( | 285 RenderWidgetHostImpl* RenderWidgetHostImpl::FromID( |
286 int32 process_id, | 286 int32 process_id, |
287 int32 routing_id) { | 287 int32 routing_id) { |
288 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 288 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
289 RoutingIDWidgetMap* widgets = g_routing_id_widget_map.Pointer(); | 289 RoutingIDWidgetMap* widgets = g_routing_id_widget_map.Pointer(); |
290 RoutingIDWidgetMap::iterator it = widgets->find( | 290 RoutingIDWidgetMap::iterator it = widgets->find( |
291 RenderWidgetHostID(process_id, routing_id)); | 291 RenderWidgetHostID(process_id, routing_id)); |
292 return it == widgets->end() ? NULL : it->second; | 292 return it == widgets->end() ? NULL : it->second; |
293 } | 293 } |
294 | 294 |
295 // static | 295 // static |
296 scoped_ptr<RenderWidgetHostIterator> RenderWidgetHost::GetRenderWidgetHosts() { | 296 scoped_ptr<RenderWidgetHostIterator> RenderWidgetHost::GetRenderWidgetHosts() { |
297 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); | 297 RenderWidgetHostIteratorImpl* hosts = new RenderWidgetHostIteratorImpl(); |
298 RoutingIDWidgetMap* widgets = g_routing_id_widget_map.Pointer(); | 298 RoutingIDWidgetMap* widgets = g_routing_id_widget_map.Pointer(); |
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2546 } | 2546 } |
2547 } | 2547 } |
2548 | 2548 |
2549 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { | 2549 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { |
2550 if (view_) | 2550 if (view_) |
2551 return view_->PreferredReadbackFormat(); | 2551 return view_->PreferredReadbackFormat(); |
2552 return SkBitmap::kARGB_8888_Config; | 2552 return SkBitmap::kARGB_8888_Config; |
2553 } | 2553 } |
2554 | 2554 |
2555 } // namespace content | 2555 } // namespace content |
OLD | NEW |