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