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 <utility> | 10 #include <utility> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #include "content/child/thread_safe_sender.h" | 68 #include "content/child/thread_safe_sender.h" |
69 #include "content/child/web_database_observer_impl.h" | 69 #include "content/child/web_database_observer_impl.h" |
70 #include "content/child/worker_thread_registry.h" | 70 #include "content/child/worker_thread_registry.h" |
71 #include "content/common/child_process_messages.h" | 71 #include "content/common/child_process_messages.h" |
72 #include "content/common/content_constants_internal.h" | 72 #include "content/common/content_constants_internal.h" |
73 #include "content/common/database_messages.h" | 73 #include "content/common/database_messages.h" |
74 #include "content/common/dom_storage/dom_storage_messages.h" | 74 #include "content/common/dom_storage/dom_storage_messages.h" |
75 #include "content/common/frame_messages.h" | 75 #include "content/common/frame_messages.h" |
76 #include "content/common/gpu/client/context_provider_command_buffer.h" | 76 #include "content/common/gpu/client/context_provider_command_buffer.h" |
77 #include "content/common/gpu/client/gpu_channel_host.h" | 77 #include "content/common/gpu/client/gpu_channel_host.h" |
78 #include "content/common/gpu/gpu_messages.h" | 78 #include "content/common/gpu/gpu_host_messages.h" |
79 #include "content/common/gpu/gpu_process_launch_causes.h" | 79 #include "content/common/gpu/gpu_process_launch_causes.h" |
80 #include "content/common/render_frame_setup.mojom.h" | 80 #include "content/common/render_frame_setup.mojom.h" |
81 #include "content/common/render_process_messages.h" | 81 #include "content/common/render_process_messages.h" |
82 #include "content/common/resource_messages.h" | 82 #include "content/common/resource_messages.h" |
83 #include "content/common/service_worker/embedded_worker_setup.mojom.h" | 83 #include "content/common/service_worker/embedded_worker_setup.mojom.h" |
84 #include "content/common/view_messages.h" | 84 #include "content/common/view_messages.h" |
85 #include "content/common/worker_messages.h" | 85 #include "content/common/worker_messages.h" |
86 #include "content/public/common/content_constants.h" | 86 #include "content/public/common/content_constants.h" |
87 #include "content/public/common/content_paths.h" | 87 #include "content/public/common/content_paths.h" |
88 #include "content/public/common/content_switches.h" | 88 #include "content/public/common/content_switches.h" |
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 | 1866 |
1867 // Recreate the channel if it has been lost. | 1867 // Recreate the channel if it has been lost. |
1868 gpu_channel_->DestroyChannel(); | 1868 gpu_channel_->DestroyChannel(); |
1869 gpu_channel_ = NULL; | 1869 gpu_channel_ = NULL; |
1870 } | 1870 } |
1871 | 1871 |
1872 // Ask the browser for the channel name. | 1872 // Ask the browser for the channel name. |
1873 int client_id = 0; | 1873 int client_id = 0; |
1874 IPC::ChannelHandle channel_handle; | 1874 IPC::ChannelHandle channel_handle; |
1875 gpu::GPUInfo gpu_info; | 1875 gpu::GPUInfo gpu_info; |
1876 if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch, | 1876 if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch, &client_id, |
1877 &client_id, | 1877 &channel_handle, &gpu_info)) || |
1878 &channel_handle, | |
1879 &gpu_info)) || | |
1880 #if defined(OS_POSIX) | 1878 #if defined(OS_POSIX) |
1881 channel_handle.socket.fd == -1 || | 1879 channel_handle.socket.fd == -1 || |
1882 #endif | 1880 #endif |
1883 channel_handle.name.empty()) { | 1881 channel_handle.name.empty()) { |
1884 // Otherwise cancel the connection. | 1882 // Otherwise cancel the connection. |
1885 return NULL; | 1883 return NULL; |
1886 } | 1884 } |
1887 | 1885 |
1888 GetContentClient()->SetGpuInfo(gpu_info); | 1886 GetContentClient()->SetGpuInfo(gpu_info); |
1889 | 1887 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 } | 2184 } |
2187 | 2185 |
2188 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2186 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
2189 size_t erased = | 2187 size_t erased = |
2190 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2188 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
2191 routing_id_); | 2189 routing_id_); |
2192 DCHECK_EQ(1u, erased); | 2190 DCHECK_EQ(1u, erased); |
2193 } | 2191 } |
2194 | 2192 |
2195 } // namespace content | 2193 } // namespace content |
OLD | NEW |