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 <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "ui/gl/gl_switches.h" | 30 #include "ui/gl/gl_switches.h" |
31 #include "ui/gl/gpu_switching_manager.h" | 31 #include "ui/gl/gpu_switching_manager.h" |
32 | 32 |
33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
34 #include "base/win/scoped_com_initializer.h" | 34 #include "base/win/scoped_com_initializer.h" |
35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
36 #include "sandbox/win/src/sandbox.h" | 36 #include "sandbox/win/src/sandbox.h" |
37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) | 37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
38 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" | 38 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" |
39 #include "content/common/gpu/media/omx_video_decode_accelerator.h" | 39 #include "content/common/gpu/media/omx_video_decode_accelerator.h" |
40 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | 40 #elif defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |
41 #include "content/common/gpu/media/vaapi_wrapper.h" | 41 #include "content/common/gpu/media/vaapi_wrapper.h" |
42 #endif | 42 #endif |
43 | 43 |
44 #if defined(USE_X11) | 44 #if defined(USE_X11) |
45 #include "ui/base/x/x11_util.h" | 45 #include "ui/base/x/x11_util.h" |
46 #endif | 46 #endif |
47 | 47 |
48 #if defined(OS_LINUX) | 48 #if defined(OS_LINUX) |
49 #include "content/public/common/sandbox_init.h" | 49 #include "content/public/common/sandbox_init.h" |
50 #endif | 50 #endif |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 unsigned char key = '\0'; | 314 unsigned char key = '\0'; |
315 bool ret = hmac.Init(&key, sizeof(key)); | 315 bool ret = hmac.Init(&key, sizeof(key)); |
316 (void) ret; | 316 (void) ret; |
317 } | 317 } |
318 | 318 |
319 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) | 319 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
320 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) | 320 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) |
321 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | 321 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
322 else | 322 else |
323 OmxVideoDecodeAccelerator::PreSandboxInitialization(); | 323 OmxVideoDecodeAccelerator::PreSandboxInitialization(); |
324 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) | 324 #elif defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) |
325 VaapiWrapper::PreSandboxInitialization(); | 325 VaapiWrapper::PreSandboxInitialization(); |
326 #endif | 326 #endif |
327 | 327 |
328 #if defined(OS_WIN) | 328 #if defined(OS_WIN) |
329 { | 329 { |
330 TRACE_EVENT0("gpu", "Preload setupapi.dll"); | 330 TRACE_EVENT0("gpu", "Preload setupapi.dll"); |
331 // Preload this DLL because the sandbox prevents it from loading. | 331 // Preload this DLL because the sandbox prevents it from loading. |
332 LoadLibrary(L"setupapi.dll"); | 332 LoadLibrary(L"setupapi.dll"); |
333 } | 333 } |
334 | 334 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 return true; | 387 return true; |
388 } | 388 } |
389 | 389 |
390 return false; | 390 return false; |
391 } | 391 } |
392 #endif // defined(OS_WIN) | 392 #endif // defined(OS_WIN) |
393 | 393 |
394 } // namespace. | 394 } // namespace. |
395 | 395 |
396 } // namespace content | 396 } // namespace content |
OLD | NEW |