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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
56 #include "base/win/windows_version.h" | 56 #include "base/win/windows_version.h" |
57 #include "base/win/scoped_com_initializer.h" | 57 #include "base/win/scoped_com_initializer.h" |
58 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 58 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
59 #include "sandbox/win/src/sandbox.h" | 59 #include "sandbox/win/src/sandbox.h" |
60 #endif | 60 #endif |
61 | 61 |
62 #if defined(USE_X11) | 62 #if defined(USE_X11) |
63 #include "ui/base/x/x11_util.h" | 63 #include "ui/base/x/x11_util.h" |
| 64 #include "ui/gfx/x/x11_switches.h" |
64 #endif | 65 #endif |
65 | 66 |
66 #if defined(OS_LINUX) | 67 #if defined(OS_LINUX) |
67 #include "content/public/common/sandbox_init.h" | 68 #include "content/public/common/sandbox_init.h" |
68 #endif | 69 #endif |
69 | 70 |
70 #if defined(OS_MACOSX) | 71 #if defined(OS_MACOSX) |
71 #include "base/message_loop/message_pump_mac.h" | 72 #include "base/message_loop/message_pump_mac.h" |
72 #include "content/common/sandbox_mac.h" | 73 #include "content/common/sandbox_mac.h" |
73 #endif | 74 #endif |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 141 |
141 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
142 // Prevent Windows from displaying a modal dialog on failures like not being | 143 // Prevent Windows from displaying a modal dialog on failures like not being |
143 // able to load a DLL. | 144 // able to load a DLL. |
144 SetErrorMode( | 145 SetErrorMode( |
145 SEM_FAILCRITICALERRORS | | 146 SEM_FAILCRITICALERRORS | |
146 SEM_NOGPFAULTERRORBOX | | 147 SEM_NOGPFAULTERRORBOX | |
147 SEM_NOOPENFILEERRORBOX); | 148 SEM_NOOPENFILEERRORBOX); |
148 #elif defined(USE_X11) | 149 #elif defined(USE_X11) |
149 ui::SetDefaultX11ErrorHandlers(); | 150 ui::SetDefaultX11ErrorHandlers(); |
| 151 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 152 switches::kWindowDepth)); |
150 #endif | 153 #endif |
151 | 154 |
152 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); | 155 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); |
153 | 156 |
154 if (command_line.HasSwitch(switches::kSupportsDualGpus)) { | 157 if (command_line.HasSwitch(switches::kSupportsDualGpus)) { |
155 std::string types = command_line.GetSwitchValueASCII( | 158 std::string types = command_line.GetSwitchValueASCII( |
156 switches::kGpuDriverBugWorkarounds); | 159 switches::kGpuDriverBugWorkarounds); |
157 std::set<int> workarounds; | 160 std::set<int> workarounds; |
158 gpu::StringToFeatureSet(types, &workarounds); | 161 gpu::StringToFeatureSet(types, &workarounds); |
159 if (workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1) | 162 if (workarounds.count(gpu::FORCE_DISCRETE_GPU) == 1) |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 return true; | 572 return true; |
570 } | 573 } |
571 | 574 |
572 return false; | 575 return false; |
573 } | 576 } |
574 #endif // defined(OS_WIN) | 577 #endif // defined(OS_WIN) |
575 | 578 |
576 } // namespace. | 579 } // namespace. |
577 | 580 |
578 } // namespace content | 581 } // namespace content |
OLD | NEW |