Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/common/sandbox_mac.mm

Issue 1882373004: Migrate content/common/gpu/media code to media/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix several more bot-identified build issues Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/common/sandbox_mac.h" 5 #include "content/common/sandbox_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "base/macros.h" 25 #include "base/macros.h"
26 #include "base/rand_util.h" 26 #include "base/rand_util.h"
27 #include "base/strings/string16.h" 27 #include "base/strings/string16.h"
28 #include "base/strings/string_piece.h" 28 #include "base/strings/string_piece.h"
29 #include "base/strings/string_split.h" 29 #include "base/strings/string_split.h"
30 #include "base/strings/string_util.h" 30 #include "base/strings/string_util.h"
31 #include "base/strings/stringprintf.h" 31 #include "base/strings/stringprintf.h"
32 #include "base/strings/sys_string_conversions.h" 32 #include "base/strings/sys_string_conversions.h"
33 #include "base/strings/utf_string_conversions.h" 33 #include "base/strings/utf_string_conversions.h"
34 #include "base/sys_info.h" 34 #include "base/sys_info.h"
35 #include "content/common/gpu/media/vt_video_decode_accelerator_mac.h"
36 #include "content/grit/content_resources.h" 35 #include "content/grit/content_resources.h"
37 #include "content/public/common/content_client.h" 36 #include "content/public/common/content_client.h"
38 #include "content/public/common/content_switches.h" 37 #include "content/public/common/content_switches.h"
38 #include "media/gpu/vt_video_decode_accelerator_mac.h"
39 #include "sandbox/mac/seatbelt.h" 39 #include "sandbox/mac/seatbelt.h"
40 #include "third_party/icu/source/common/unicode/uchar.h" 40 #include "third_party/icu/source/common/unicode/uchar.h"
41 #include "ui/base/layout.h" 41 #include "ui/base/layout.h"
42 #include "ui/gl/gl_surface.h" 42 #include "ui/gl/gl_surface.h"
43 43
44 extern "C" { 44 extern "C" {
45 void CGSSetDenyWindowServerConnections(bool); 45 void CGSSetDenyWindowServerConnections(bool);
46 void CGSShutdownServerConnections(); 46 void CGSShutdownServerConnections();
47 }; 47 };
48 48
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Needed by Media Galleries API Picasa - crbug.com/151701 325 // Needed by Media Galleries API Picasa - crbug.com/151701
326 CFTimeZoneCopySystem(); 326 CFTimeZoneCopySystem();
327 } 327 }
328 328
329 if (sandbox_type == SANDBOX_TYPE_GPU) { 329 if (sandbox_type == SANDBOX_TYPE_GPU) {
330 // Preload either the desktop GL or the osmesa so, depending on the 330 // Preload either the desktop GL or the osmesa so, depending on the
331 // --use-gl flag. 331 // --use-gl flag.
332 gfx::GLSurface::InitializeOneOff(); 332 gfx::GLSurface::InitializeOneOff();
333 333
334 // Preload VideoToolbox. 334 // Preload VideoToolbox.
335 InitializeVideoToolbox(); 335 media::InitializeVideoToolbox();
336 } 336 }
337 337
338 if (sandbox_type == SANDBOX_TYPE_PPAPI) { 338 if (sandbox_type == SANDBOX_TYPE_PPAPI) {
339 // Preload AppKit color spaces used for Flash/ppapi. http://crbug.com/348304 339 // Preload AppKit color spaces used for Flash/ppapi. http://crbug.com/348304
340 NSColor* color = [NSColor controlTextColor]; 340 NSColor* color = [NSColor controlTextColor];
341 [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; 341 [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
342 } 342 }
343 343
344 if (sandbox_type == SANDBOX_TYPE_RENDERER && 344 if (sandbox_type == SANDBOX_TYPE_RENDERER &&
345 base::mac::IsOSMountainLionOrLater()) { 345 base::mac::IsOSMountainLionOrLater()) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 507 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
508 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 508 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
509 << path.value(); 509 << path.value();
510 return path; 510 return path;
511 } 511 }
512 512
513 return base::FilePath(canonical_path); 513 return base::FilePath(canonical_path);
514 } 514 }
515 515
516 } // namespace content 516 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698