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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 const std::string& lang = | 892 const std::string& lang = |
893 parsed_command_line.GetSwitchValueASCII(switches::kLang); | 893 parsed_command_line.GetSwitchValueASCII(switches::kLang); |
894 DCHECK(!lang.empty()); | 894 DCHECK(!lang.empty()); |
895 return lang; | 895 return lang; |
896 } | 896 } |
897 | 897 |
898 IPC::SyncMessageFilter* RenderThreadImpl::GetSyncMessageFilter() { | 898 IPC::SyncMessageFilter* RenderThreadImpl::GetSyncMessageFilter() { |
899 return sync_message_filter(); | 899 return sync_message_filter(); |
900 } | 900 } |
901 | 901 |
902 scoped_refptr<base::MessageLoopProxy> | 902 scoped_refptr<base::SingleThreadTaskRunner> |
903 RenderThreadImpl::GetIOMessageLoopProxy() { | 903 RenderThreadImpl::GetIOMessageLoopProxy() { |
904 return ChildProcess::current()->io_message_loop_proxy(); | 904 return ChildProcess::current()->io_task_runner(); |
905 } | 905 } |
906 | 906 |
907 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { | 907 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { |
908 ChildThreadImpl::GetRouter()->AddRoute(routing_id, listener); | 908 ChildThreadImpl::GetRouter()->AddRoute(routing_id, listener); |
909 PendingRenderFrameConnectMap::iterator it = | 909 PendingRenderFrameConnectMap::iterator it = |
910 pending_render_frame_connects_.find(routing_id); | 910 pending_render_frame_connects_.find(routing_id); |
911 if (it == pending_render_frame_connects_.end()) | 911 if (it == pending_render_frame_connects_.end()) |
912 return; | 912 return; |
913 | 913 |
914 RenderFrameImpl* frame = RenderFrameImpl::FromRoutingID(routing_id); | 914 RenderFrameImpl* frame = RenderFrameImpl::FromRoutingID(routing_id); |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 #endif | 1609 #endif |
1610 channel_handle.name.empty()) { | 1610 channel_handle.name.empty()) { |
1611 // Otherwise cancel the connection. | 1611 // Otherwise cancel the connection. |
1612 return NULL; | 1612 return NULL; |
1613 } | 1613 } |
1614 | 1614 |
1615 GetContentClient()->SetGpuInfo(gpu_info); | 1615 GetContentClient()->SetGpuInfo(gpu_info); |
1616 | 1616 |
1617 // Cache some variables that are needed on the compositor thread for our | 1617 // Cache some variables that are needed on the compositor thread for our |
1618 // implementation of GpuChannelHostFactory. | 1618 // implementation of GpuChannelHostFactory. |
1619 io_thread_task_runner_ = ChildProcess::current()->io_message_loop_proxy(); | 1619 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); |
1620 | 1620 |
1621 gpu_channel_ = | 1621 gpu_channel_ = |
1622 GpuChannelHost::Create(this, | 1622 GpuChannelHost::Create(this, |
1623 gpu_info, | 1623 gpu_info, |
1624 channel_handle, | 1624 channel_handle, |
1625 ChildProcess::current()->GetShutDownEvent(), | 1625 ChildProcess::current()->GetShutDownEvent(), |
1626 gpu_memory_buffer_manager()); | 1626 gpu_memory_buffer_manager()); |
1627 return gpu_channel_.get(); | 1627 return gpu_channel_.get(); |
1628 } | 1628 } |
1629 | 1629 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 } | 1885 } |
1886 | 1886 |
1887 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1887 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1888 size_t erased = | 1888 size_t erased = |
1889 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1889 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1890 routing_id_); | 1890 routing_id_); |
1891 DCHECK_EQ(1u, erased); | 1891 DCHECK_EQ(1u, erased); |
1892 } | 1892 } |
1893 | 1893 |
1894 } // namespace content | 1894 } // namespace content |
OLD | NEW |