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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2026 // and intercepts/unintercepts the kernel32 API SetPriorityClass in a | 2026 // and intercepts/unintercepts the kernel32 API SetPriorityClass in a |
2027 // background thread. If the UI thread invokes this API just when it is | 2027 // background thread. If the UI thread invokes this API just when it is |
2028 // intercepted the stack is messed up on return from the interceptor | 2028 // intercepted the stack is messed up on return from the interceptor |
2029 // which causes random crashes in the browser process. Our hack for now | 2029 // which causes random crashes in the browser process. Our hack for now |
2030 // is to not invoke the SetPriorityClass API if the dll is loaded. | 2030 // is to not invoke the SetPriorityClass API if the dll is loaded. |
2031 if (GetModuleHandle(L"cbstext.dll")) | 2031 if (GetModuleHandle(L"cbstext.dll")) |
2032 return; | 2032 return; |
2033 #endif // OS_WIN | 2033 #endif // OS_WIN |
2034 | 2034 |
2035 // Notify the child process of background state. | 2035 // Notify the child process of background state. |
2036 // TODO(wfh): re-enable this after testing if dropping the priority of | 2036 Send(new ChildProcessMsg_SetProcessBackgrounded(backgrounded)); |
2037 // backgrounded tabs is the root cause of http://crbug.com/381820. | |
2038 // Send(new ChildProcessMsg_SetProcessBackgrounded(backgrounded)); | |
2039 | 2037 |
2040 #if !defined(OS_WIN) | 2038 #if !defined(OS_WIN) |
2041 // Backgrounding may require elevated privileges not available to renderer | 2039 // Backgrounding may require elevated privileges not available to renderer |
2042 // processes, so control backgrounding from the process host. | 2040 // processes, so control backgrounding from the process host. |
2043 | 2041 |
2044 // Windows Vista+ has a fancy process backgrounding mode that can only be set | 2042 // Windows Vista+ has a fancy process backgrounding mode that can only be set |
2045 // from within the process. | 2043 // from within the process. |
2046 child_process_launcher_->SetProcessBackgrounded(backgrounded); | 2044 child_process_launcher_->SetProcessBackgrounded(backgrounded); |
2047 #endif // !OS_WIN | 2045 #endif // !OS_WIN |
2048 } | 2046 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2327 } | 2325 } |
2328 | 2326 |
2329 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2327 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
2330 gfx::GpuMemoryBufferType type, | 2328 gfx::GpuMemoryBufferType type, |
2331 const gfx::GpuMemoryBufferId& id) { | 2329 const gfx::GpuMemoryBufferId& id) { |
2332 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2330 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2333 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2331 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
2334 } | 2332 } |
2335 | 2333 |
2336 } // namespace content | 2334 } // namespace content |
OLD | NEW |