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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 DCHECK(!lang.empty() || | 377 DCHECK(!lang.empty() || |
378 (!parsed_command_line.HasSwitch(switches::kRendererProcess) && | 378 (!parsed_command_line.HasSwitch(switches::kRendererProcess) && |
379 !parsed_command_line.HasSwitch(switches::kPluginProcess))); | 379 !parsed_command_line.HasSwitch(switches::kPluginProcess))); |
380 return lang; | 380 return lang; |
381 } | 381 } |
382 | 382 |
383 IPC::SyncMessageFilter* RenderThreadImpl::GetSyncMessageFilter() { | 383 IPC::SyncMessageFilter* RenderThreadImpl::GetSyncMessageFilter() { |
384 return sync_message_filter(); | 384 return sync_message_filter(); |
385 } | 385 } |
386 | 386 |
| 387 scoped_refptr<base::MessageLoopProxy> |
| 388 RenderThreadImpl::GetIOMessageLoopProxy() { |
| 389 return ChildProcess::current()->io_message_loop_proxy(); |
| 390 } |
| 391 |
387 void RenderThreadImpl::AddRoute(int32 routing_id, | 392 void RenderThreadImpl::AddRoute(int32 routing_id, |
388 IPC::Channel::Listener* listener) { | 393 IPC::Channel::Listener* listener) { |
389 widget_count_++; | 394 widget_count_++; |
390 return ChildThread::AddRoute(routing_id, listener); | 395 return ChildThread::AddRoute(routing_id, listener); |
391 } | 396 } |
392 | 397 |
393 void RenderThreadImpl::RemoveRoute(int32 routing_id) { | 398 void RenderThreadImpl::RemoveRoute(int32 routing_id) { |
394 widget_count_--; | 399 widget_count_--; |
395 return ChildThread::RemoveRoute(routing_id); | 400 return ChildThread::RemoveRoute(routing_id); |
396 } | 401 } |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 | 971 |
967 scoped_refptr<base::MessageLoopProxy> | 972 scoped_refptr<base::MessageLoopProxy> |
968 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 973 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
969 DCHECK(message_loop() == MessageLoop::current()); | 974 DCHECK(message_loop() == MessageLoop::current()); |
970 if (!file_thread_.get()) { | 975 if (!file_thread_.get()) { |
971 file_thread_.reset(new base::Thread("Renderer::FILE")); | 976 file_thread_.reset(new base::Thread("Renderer::FILE")); |
972 file_thread_->Start(); | 977 file_thread_->Start(); |
973 } | 978 } |
974 return file_thread_->message_loop_proxy(); | 979 return file_thread_->message_loop_proxy(); |
975 } | 980 } |
OLD | NEW |