| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 &channel_handle, | 791 &channel_handle, |
| 792 &renderer_process_for_gpu, | 792 &renderer_process_for_gpu, |
| 793 &gpu_info)) || | 793 &gpu_info)) || |
| 794 channel_handle.name.empty() || | 794 channel_handle.name.empty() || |
| 795 renderer_process_for_gpu == base::kNullProcessHandle) { | 795 renderer_process_for_gpu == base::kNullProcessHandle) { |
| 796 // Otherwise cancel the connection. | 796 // Otherwise cancel the connection. |
| 797 gpu_channel_ = NULL; | 797 gpu_channel_ = NULL; |
| 798 return NULL; | 798 return NULL; |
| 799 } | 799 } |
| 800 | 800 |
| 801 #if defined(OS_POSIX) |
| 802 // Check the validity of fd for bug investigation. Replace with normal error |
| 803 // handling (see above) after bug fixed. See for details: crbug.com/95732. |
| 804 CHECK_NE(-1, channel_handle.socket.fd); |
| 805 #endif |
| 806 |
| 801 gpu_channel_->set_gpu_info(gpu_info); | 807 gpu_channel_->set_gpu_info(gpu_info); |
| 802 content::GetContentClient()->SetGpuInfo(gpu_info); | 808 content::GetContentClient()->SetGpuInfo(gpu_info); |
| 803 | 809 |
| 804 // Connect to the GPU process if a channel name was received. | 810 // Connect to the GPU process if a channel name was received. |
| 805 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu); | 811 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu); |
| 806 | 812 |
| 807 return GetGpuChannel(); | 813 return GetGpuChannel(); |
| 808 } | 814 } |
| 809 | 815 |
| 810 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { | 816 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 840 | 846 |
| 841 scoped_refptr<base::MessageLoopProxy> | 847 scoped_refptr<base::MessageLoopProxy> |
| 842 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 848 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
| 843 DCHECK(message_loop() == MessageLoop::current()); | 849 DCHECK(message_loop() == MessageLoop::current()); |
| 844 if (!file_thread_.get()) { | 850 if (!file_thread_.get()) { |
| 845 file_thread_.reset(new base::Thread("Renderer::FILE")); | 851 file_thread_.reset(new base::Thread("Renderer::FILE")); |
| 846 file_thread_->Start(); | 852 file_thread_->Start(); |
| 847 } | 853 } |
| 848 return file_thread_->message_loop_proxy(); | 854 return file_thread_->message_loop_proxy(); |
| 849 } | 855 } |
| OLD | NEW |