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

Side by Side Diff: chrome/renderer/renderer_main_platform_delegate_mac.mm

Issue 21330: Enable --single-process for Mac and Linux.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/renderer/renderer_main_platform_delegate.h" 5 #include "chrome/renderer/renderer_main_platform_delegate.h"
6 6
7 #include "base/debug_util.h" 7 #include "base/debug_util.h"
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 #import <ApplicationServices/ApplicationServices.h> 10 #import <ApplicationServices/ApplicationServices.h>
11 extern "C" { 11 extern "C" {
12 #include <sandbox.h> 12 #include <sandbox.h>
13 } 13 }
14 14
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" 17 #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
18 18
19 RendererMainPlatformDelegate::RendererMainPlatformDelegate( 19 RendererMainPlatformDelegate::RendererMainPlatformDelegate(
20 const MainFunctionParams& parameters) 20 const MainFunctionParams& parameters)
21 : parameters_(parameters) { 21 : parameters_(parameters) {
22 } 22 }
23 23
24 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { 24 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
25 } 25 }
26 26
27 // TODO(mac-port): Any code needed to initialize a process for
28 // purposes of running a renderer needs to also be reflected in
29 // chrome_dll_main.cc for --single-process support.
27 void RendererMainPlatformDelegate::PlatformInitialize() { 30 void RendererMainPlatformDelegate::PlatformInitialize() {
28 // Load WebKit system interfaces. 31 // Load WebKit system interfaces.
29 InitWebCoreSystemInterface(); 32 InitWebCoreSystemInterface();
30 33
31 // Warmup CG - without these calls these two functions won't work in the 34 // Warmup CG - without these calls these two functions won't work in the
32 // sandbox. 35 // sandbox.
33 CGColorSpaceRef rgb_colorspace = 36 CGColorSpaceRef rgb_colorspace =
34 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); 37 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
35 38
36 // Allocate a 1 byte image. 39 // Allocate a 1 byte image.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (error == -1) { 91 if (error == -1) {
89 LOG(ERROR) << "Failed to Initialize Sandbox: " << error_buff; 92 LOG(ERROR) << "Failed to Initialize Sandbox: " << error_buff;
90 } 93 }
91 sandbox_free_error(error_buff); 94 sandbox_free_error(error_buff);
92 return success; 95 return success;
93 } 96 }
94 97
95 void RendererMainPlatformDelegate::RunSandboxTests() { 98 void RendererMainPlatformDelegate::RunSandboxTests() {
96 // TODO(port): Run sandbox unit test here. 99 // TODO(port): Run sandbox unit test here.
97 } 100 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698