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

Unified Diff: chrome/renderer/renderer_main_platform_delegate_mac.mm

Issue 345051: Cleans up our autorelease handling so that we don't create a layered ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« base/message_pump_mac.mm ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_main_platform_delegate_mac.mm
===================================================================
--- chrome/renderer/renderer_main_platform_delegate_mac.mm (revision 31104)
+++ chrome/renderer/renderer_main_platform_delegate_mac.mm (working copy)
@@ -6,6 +6,7 @@
#import <Cocoa/Cocoa.h>
+#import "base/chrome_application_mac.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/sandbox_mac.h"
@@ -19,10 +20,14 @@
RendererMainPlatformDelegate::~RendererMainPlatformDelegate() {
}
-// TODO(mac-port): Any code needed to initialize a process for
-// purposes of running a renderer needs to also be reflected in
-// chrome_dll_main.cc for --single-process support.
+// TODO(mac-port): Any code needed to initialize a process for purposes of
+// running a renderer needs to also be reflected in chrome_dll_main.cc for
+// --single-process support.
void RendererMainPlatformDelegate::PlatformInitialize() {
+ // Initialize NSApplication using the custom subclass. Without this call,
+ // drawing of native UI elements (e.g. buttons) in WebKit will explode.
+ [CrApplication sharedApplication];
+
// Load WebKit system interfaces.
InitWebCoreSystemInterface();
@@ -32,10 +37,6 @@
toTarget:string
withObject:nil];
}
-
- // Initialize Cocoa. Without this call, drawing of native UI
- // elements (e.g. buttons) in WebKit will explode.
- [NSApplication sharedApplication];
}
void RendererMainPlatformDelegate::PlatformUninitialize() {
« base/message_pump_mac.mm ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698