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

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

Issue 1920163005: Split //ui/gl into //ui/gl + //ui/gi/init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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
« no previous file with comments | « components/mus/gles2/gpu_state.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21 matching lines...) Expand all
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/grit/content_resources.h" 35 #include "content/grit/content_resources.h"
36 #include "content/public/common/content_client.h" 36 #include "content/public/common/content_client.h"
37 #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" 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/init/gl_factory.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
49 namespace content { 49 namespace content {
50 namespace { 50 namespace {
51 51
52 // Is the sandbox currently active. 52 // Is the sandbox currently active.
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // Process-type dependent warm-up. 322 // Process-type dependent warm-up.
323 if (sandbox_type == SANDBOX_TYPE_UTILITY) { 323 if (sandbox_type == SANDBOX_TYPE_UTILITY) {
324 // CFTimeZoneCopyZone() tries to read /etc and /private/etc/localtime - 10.8 324 // CFTimeZoneCopyZone() tries to read /etc and /private/etc/localtime - 10.8
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 gl::init::InitializeGLOneOff();
333 333
334 // Preload VideoToolbox. 334 // Preload VideoToolbox.
335 media::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 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 504 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
505 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 505 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
506 << path.value(); 506 << path.value();
507 return path; 507 return path;
508 } 508 }
509 509
510 return base::FilePath(canonical_path); 510 return base::FilePath(canonical_path);
511 } 511 }
512 512
513 } // namespace content 513 } // namespace content
OLDNEW
« no previous file with comments | « components/mus/gles2/gpu_state.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698