| 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 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { | 1869 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { |
| 1870 if (!gpu_channel_.get()) | 1870 if (!gpu_channel_.get()) |
| 1871 return NULL; | 1871 return NULL; |
| 1872 | 1872 |
| 1873 if (gpu_channel_->IsLost()) | 1873 if (gpu_channel_->IsLost()) |
| 1874 return NULL; | 1874 return NULL; |
| 1875 | 1875 |
| 1876 return gpu_channel_.get(); | 1876 return gpu_channel_.get(); |
| 1877 } | 1877 } |
| 1878 | 1878 |
| 1879 bool RenderThreadImpl::HasGpuProcess() { |
| 1880 bool hasGpuProcess = false; |
| 1881 if (!Send(new GpuHostMsg_HasGpuProcess(&hasGpuProcess))) |
| 1882 return false; |
| 1883 |
| 1884 return hasGpuProcess; |
| 1885 } |
| 1886 |
| 1879 #if defined(ENABLE_PLUGINS) | 1887 #if defined(ENABLE_PLUGINS) |
| 1880 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { | 1888 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { |
| 1881 EnsureWebKitInitialized(); | 1889 EnsureWebKitInitialized(); |
| 1882 // The call below will cause a GetPlugins call with refresh=true, but at this | 1890 // The call below will cause a GetPlugins call with refresh=true, but at this |
| 1883 // point we already know that the browser has refreshed its list, so disable | 1891 // point we already know that the browser has refreshed its list, so disable |
| 1884 // refresh temporarily to prevent each renderer process causing the list to be | 1892 // refresh temporarily to prevent each renderer process causing the list to be |
| 1885 // regenerated. | 1893 // regenerated. |
| 1886 blink_platform_impl_->set_plugin_refresh_allowed(false); | 1894 blink_platform_impl_->set_plugin_refresh_allowed(false); |
| 1887 blink::resetPluginCache(reload_pages); | 1895 blink::resetPluginCache(reload_pages); |
| 1888 blink_platform_impl_->set_plugin_refresh_allowed(true); | 1896 blink_platform_impl_->set_plugin_refresh_allowed(true); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2127 } | 2135 } |
| 2128 | 2136 |
| 2129 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2137 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2130 size_t erased = | 2138 size_t erased = |
| 2131 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2139 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2132 routing_id_); | 2140 routing_id_); |
| 2133 DCHECK_EQ(1u, erased); | 2141 DCHECK_EQ(1u, erased); |
| 2134 } | 2142 } |
| 2135 | 2143 |
| 2136 } // namespace content | 2144 } // namespace content |
| OLD | NEW |