| 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/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 bool RenderThreadImpl::IsGatherPixelRefsEnabled() { | 1472 bool RenderThreadImpl::IsGatherPixelRefsEnabled() { |
| 1473 return is_gather_pixel_refs_enabled_; | 1473 return is_gather_pixel_refs_enabled_; |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 bool RenderThreadImpl::IsMainThread() { | 1476 bool RenderThreadImpl::IsMainThread() { |
| 1477 return !!current(); | 1477 return !!current(); |
| 1478 } | 1478 } |
| 1479 | 1479 |
| 1480 base::MessageLoop* RenderThreadImpl::GetMainLoop() { | |
| 1481 return message_loop(); | |
| 1482 } | |
| 1483 | |
| 1484 scoped_refptr<base::MessageLoopProxy> RenderThreadImpl::GetIOLoopProxy() { | 1480 scoped_refptr<base::MessageLoopProxy> RenderThreadImpl::GetIOLoopProxy() { |
| 1485 return io_message_loop_proxy_; | 1481 return io_message_loop_proxy_; |
| 1486 } | 1482 } |
| 1487 | 1483 |
| 1488 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory( | 1484 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory( |
| 1489 size_t size) { | 1485 size_t size) { |
| 1490 return scoped_ptr<base::SharedMemory>( | 1486 return scoped_ptr<base::SharedMemory>( |
| 1491 HostAllocateSharedMemoryBuffer(size)); | 1487 HostAllocateSharedMemoryBuffer(size)); |
| 1492 } | 1488 } |
| 1493 | 1489 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 } | 1897 } |
| 1902 | 1898 |
| 1903 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1899 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1904 size_t erased = | 1900 size_t erased = |
| 1905 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1901 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1906 routing_id_); | 1902 routing_id_); |
| 1907 DCHECK_EQ(1u, erased); | 1903 DCHECK_EQ(1u, erased); |
| 1908 } | 1904 } |
| 1909 | 1905 |
| 1910 } // namespace content | 1906 } // namespace content |
| OLD | NEW |