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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // watchdog because this can take a lot of time and the GPU watchdog might | 75 // watchdog because this can take a lot of time and the GPU watchdog might |
76 // terminate the GPU process. | 76 // terminate the GPU process. |
77 if (!gfx::GLSurface::InitializeOneOff()) { | 77 if (!gfx::GLSurface::InitializeOneOff()) { |
78 LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed"; | 78 LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed"; |
79 dead_on_arrival = true; | 79 dead_on_arrival = true; |
80 } | 80 } |
81 | 81 |
82 base::win::ScopedCOMInitializer com_initializer; | 82 base::win::ScopedCOMInitializer com_initializer; |
83 | 83 |
84 #if defined(OS_WIN) | 84 #if defined(OS_WIN) |
| 85 // Preload this DLL because the sandbox prevents it from loading. |
| 86 LoadLibrary(L"setupapi.dll"); |
| 87 |
85 sandbox::TargetServices* target_services = | 88 sandbox::TargetServices* target_services = |
86 parameters.sandbox_info->target_services; | 89 parameters.sandbox_info->target_services; |
87 // Initialize H/W video decoding stuff which fails in the sandbox. | 90 // Initialize H/W video decoding stuff which fails in the sandbox. |
88 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 91 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
89 // For windows, if the target_services interface is not zero, the process | 92 // For windows, if the target_services interface is not zero, the process |
90 // is sandboxed and we must call LowerToken() before rendering untrusted | 93 // is sandboxed and we must call LowerToken() before rendering untrusted |
91 // content. | 94 // content. |
92 if (target_services) | 95 if (target_services) |
93 target_services->LowerToken(); | 96 target_services->LowerToken(); |
94 #endif | 97 #endif |
(...skipping 21 matching lines...) Expand all Loading... |
116 child_thread->Init(start_time); | 119 child_thread->Init(start_time); |
117 | 120 |
118 gpu_process.set_main_thread(child_thread); | 121 gpu_process.set_main_thread(child_thread); |
119 | 122 |
120 main_message_loop.Run(); | 123 main_message_loop.Run(); |
121 | 124 |
122 child_thread->StopWatchdog(); | 125 child_thread->StopWatchdog(); |
123 | 126 |
124 return 0; | 127 return 0; |
125 } | 128 } |
OLD | NEW |