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

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

Issue 8771028: [Mac] Remove content/ CrApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk for commit-queue. Created 9 years 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 | « content/plugin/plugin_main_mac.mm ('k') | remoting/host/simple_host_process.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <objc/runtime.h> 8 #include <objc/runtime.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/sys_string_conversions.h" 12 #include "base/sys_string_conversions.h"
13 #import "chrome/test/security_tests/renderer_sandbox_tests_mac.h" 13 #import "chrome/test/security_tests/renderer_sandbox_tests_mac.h"
14 #import "content/common/chrome_application_mac.h"
15 #include "content/common/sandbox_mac.h" 14 #include "content/common/sandbox_mac.h"
16 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
17 #include "content/common/sandbox_init_mac.h" 16 #include "content/common/sandbox_init_mac.h"
18 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface .h" 17 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface .h"
19 18
20 RendererMainPlatformDelegate::RendererMainPlatformDelegate( 19 RendererMainPlatformDelegate::RendererMainPlatformDelegate(
21 const content::MainFunctionParams& parameters) 20 const content::MainFunctionParams& parameters)
22 : parameters_(parameters) { 21 : parameters_(parameters) {
23 } 22 }
24 23
25 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { 24 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
26 } 25 }
27 26
28 // TODO(mac-port): Any code needed to initialize a process for purposes of 27 // TODO(mac-port): Any code needed to initialize a process for purposes of
29 // running a renderer needs to also be reflected in chrome_main.cc for 28 // running a renderer needs to also be reflected in chrome_main.cc for
30 // --single-process support. 29 // --single-process support.
31 void RendererMainPlatformDelegate::PlatformInitialize() { 30 void RendererMainPlatformDelegate::PlatformInitialize() {
32 // Initialize NSApplication using the custom subclass. Without this call, 31 // Initialize NSApplication up front. Without this call, drawing of
33 // drawing of native UI elements (e.g. buttons) in WebKit will explode. 32 // native UI elements (e.g. buttons) in WebKit will explode.
34 [CrApplication sharedApplication]; 33 [NSApplication sharedApplication];
35 34
36 // Load WebKit system interfaces. 35 // Load WebKit system interfaces.
37 InitWebCoreSystemInterface(); 36 InitWebCoreSystemInterface();
38 37
39 if (![NSThread isMultiThreaded]) { 38 if (![NSThread isMultiThreaded]) {
40 NSString* string = @""; 39 NSString* string = @"";
41 [NSThread detachNewThreadSelector:@selector(length) 40 [NSThread detachNewThreadSelector:@selector(length)
42 toTarget:string 41 toTarget:string
43 withObject:nil]; 42 withObject:nil];
44 } 43 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void RendererMainPlatformDelegate::RunSandboxTests() { 82 void RendererMainPlatformDelegate::RunSandboxTests() {
84 Class tests_runner = objc_getClass("RendererSandboxTestsRunner"); 83 Class tests_runner = objc_getClass("RendererSandboxTestsRunner");
85 if (tests_runner) { 84 if (tests_runner) {
86 if (![tests_runner runTests]) 85 if (![tests_runner runTests])
87 LOG(ERROR) << "Running renderer with failing sandbox tests!"; 86 LOG(ERROR) << "Running renderer with failing sandbox tests!";
88 [sandbox_tests_bundle_ unload]; 87 [sandbox_tests_bundle_ unload];
89 [sandbox_tests_bundle_ release]; 88 [sandbox_tests_bundle_ release];
90 sandbox_tests_bundle_ = nil; 89 sandbox_tests_bundle_ = nil;
91 } 90 }
92 } 91 }
OLDNEW
« no previous file with comments | « content/plugin/plugin_main_mac.mm ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698