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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 #if defined(OS_WIN) | 187 #if defined(OS_WIN) |
188 // Prevent Windows from displaying a modal dialog on failures like not being | 188 // Prevent Windows from displaying a modal dialog on failures like not being |
189 // able to load a DLL. | 189 // able to load a DLL. |
190 SetErrorMode( | 190 SetErrorMode( |
191 SEM_FAILCRITICALERRORS | | 191 SEM_FAILCRITICALERRORS | |
192 SEM_NOGPFAULTERRORBOX | | 192 SEM_NOGPFAULTERRORBOX | |
193 SEM_NOOPENFILEERRORBOX); | 193 SEM_NOOPENFILEERRORBOX); |
194 #elif defined(USE_X11) | 194 #elif defined(USE_X11) |
195 ui::SetDefaultX11ErrorHandlers(); | 195 ui::SetDefaultX11ErrorHandlers(); |
196 | 196 |
197 #if !defined(OS_CHROMEOS) | |
198 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | |
199 switches::kWindowDepth)); | |
200 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | |
201 switches::kX11VisualID)); | |
202 #endif | |
203 | |
204 #endif | 197 #endif |
205 | 198 |
206 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); | 199 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); |
207 | 200 |
208 #if defined(OS_WIN) | 201 #if defined(OS_WIN) |
209 // Use a UI message loop because ANGLE and the desktop GL platform can | 202 // Use a UI message loop because ANGLE and the desktop GL platform can |
210 // create child windows to render to. | 203 // create child windows to render to. |
211 base::MessagePumpForGpu::InitFactory(); | 204 base::MessagePumpForGpu::InitFactory(); |
212 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); | 205 base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); |
213 #elif defined(USE_X11) | 206 #elif defined(USE_X11) |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 return true; | 350 return true; |
358 } | 351 } |
359 | 352 |
360 return false; | 353 return false; |
361 } | 354 } |
362 #endif // defined(OS_WIN) | 355 #endif // defined(OS_WIN) |
363 | 356 |
364 } // namespace. | 357 } // namespace. |
365 | 358 |
366 } // namespace content | 359 } // namespace content |
OLD | NEW |