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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1907 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { | 1907 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { |
1908 if (!gpu_channel_.get()) | 1908 if (!gpu_channel_.get()) |
1909 return NULL; | 1909 return NULL; |
1910 | 1910 |
1911 if (gpu_channel_->IsLost()) | 1911 if (gpu_channel_->IsLost()) |
1912 return NULL; | 1912 return NULL; |
1913 | 1913 |
1914 return gpu_channel_.get(); | 1914 return gpu_channel_.get(); |
1915 } | 1915 } |
1916 | 1916 |
1917 bool RenderThreadImpl::HasGpuProcess() { | |
1918 bool hasGpuProcess = false; | |
jam
2016/02/10 18:32:33
no reason to add this in RenderThreadImpl just for
| |
1919 if (!Send(new GpuHostMsg_HasGpuProcess(&hasGpuProcess))) | |
1920 return false; | |
1921 | |
1922 return hasGpuProcess; | |
1923 } | |
1924 | |
1917 #if defined(ENABLE_PLUGINS) | 1925 #if defined(ENABLE_PLUGINS) |
1918 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { | 1926 void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { |
1919 EnsureWebKitInitialized(); | 1927 EnsureWebKitInitialized(); |
1920 // The call below will cause a GetPlugins call with refresh=true, but at this | 1928 // The call below will cause a GetPlugins call with refresh=true, but at this |
1921 // point we already know that the browser has refreshed its list, so disable | 1929 // point we already know that the browser has refreshed its list, so disable |
1922 // refresh temporarily to prevent each renderer process causing the list to be | 1930 // refresh temporarily to prevent each renderer process causing the list to be |
1923 // regenerated. | 1931 // regenerated. |
1924 blink_platform_impl_->set_plugin_refresh_allowed(false); | 1932 blink_platform_impl_->set_plugin_refresh_allowed(false); |
1925 blink::resetPluginCache(reload_pages); | 1933 blink::resetPluginCache(reload_pages); |
1926 blink_platform_impl_->set_plugin_refresh_allowed(true); | 1934 blink_platform_impl_->set_plugin_refresh_allowed(true); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2165 } | 2173 } |
2166 | 2174 |
2167 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2175 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
2168 size_t erased = | 2176 size_t erased = |
2169 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2177 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
2170 routing_id_); | 2178 routing_id_); |
2171 DCHECK_EQ(1u, erased); | 2179 DCHECK_EQ(1u, erased); |
2172 } | 2180 } |
2173 | 2181 |
2174 } // namespace content | 2182 } // namespace content |
OLD | NEW |