diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:00:42 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:00:42 +0000 |
commit | ce8c16ad0e9e0170ca4dbf6b8fdefd4c8a40a29e (patch) | |
tree | c65c41310035000d8d6678fc160fbdc10e34056a /chrome/browser | |
parent | 7f238151b275f1f4c13bd9c61e59bcc2a34b6442 (diff) | |
download | chromium_src-ce8c16ad0e9e0170ca4dbf6b8fdefd4c8a40a29e.zip chromium_src-ce8c16ad0e9e0170ca4dbf6b8fdefd4c8a40a29e.tar.gz chromium_src-ce8c16ad0e9e0170ca4dbf6b8fdefd4c8a40a29e.tar.bz2 |
Remove TransformProcessType from the browser process now that LSUIElement
is gone.
BUG=8044
TEST=Dock icon still works properly
Review URL: http://codereview.chromium.org/165384
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_main_mac.mm | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm index 7a43cdc..b532742 100644 --- a/chrome/browser/browser_main_mac.mm +++ b/chrome/browser/browser_main_mac.mm @@ -2,17 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <crt_externs.h> -#include <Cocoa/Cocoa.h> +#import <Cocoa/Cocoa.h> #include "base/command_line.h" -#include "chrome/app/keystone_glue.h" -#include "chrome/browser/app_controller_mac.h" +#import "chrome/app/keystone_glue.h" #include "chrome/browser/browser_main_win.h" #include "chrome/common/result_codes.h" namespace Platform { -// Perform and platform-specific work that needs to be done before the main +// Perform any platform-specific work that needs to be done before the main // message loop is created and initialized. // // For Mac, this involves telling Cooca to finish its initalization, which we @@ -22,32 +20,13 @@ namespace Platform { // load the main nib directly. The main event loop is run from common code using // the MessageLoop API, which works out ok for us because it's a wrapper around // CFRunLoop. -void WillInitializeMainMessageLoop(const CommandLine & command_line) { +void WillInitializeMainMessageLoop(const CommandLine& command_line) { [NSApplication sharedApplication]; [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; - // Doesn't need to be in a GOOGLE_CHROME_BUILD since this references - // a framework only distributed with Google Chrome. + // This is a no-op if the KeystoneRegistration framework is not present. + // The framework is only distributed with branded Google Chrome builds. [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; - - // TODO(port): Use of LSUIElement=1 is a temporary fix. The right - // answer is to fix the renderer to not use Cocoa. - // - // Chromium.app currently as LSUIElement=1 in it's Info.plist. This - // allows subprocesses (created with a relaunch of our binary) to - // create an NSApplication without showing up in the dock. - // Subprocesses (such as the renderer) need an NSApplication for - // Cocoa happiness However, for the browser itself, we DO want it in - // the dock. These 3 lines make it happen. - // - // Real fix tracked by http://code.google.com/p/chromium/issues/detail?id=8044 - ProcessSerialNumber psn; - GetCurrentProcess(&psn); - TransformProcessType(&psn, kProcessTransformToForegroundApplication); - // Fix the menubar. Ugly. To be removed along with the rest of the - // LSUIElement stuff. - [NSApp deactivate]; - [NSApp activateIgnoringOtherApps:YES]; } // Perform platform-specific work that needs to be done after the main event @@ -59,7 +38,7 @@ void WillTerminate() { object:NSApp]; } -} +} // namespace Platform // From browser_main_win.h, stubs until we figure out the right thing... @@ -68,14 +47,14 @@ int DoUninstallTasks(bool chrome_still_running) { } bool DoUpgradeTasks(const CommandLine& command_line) { - return ResultCodes::NORMAL_EXIT; + return false; } bool CheckForWin2000() { return false; } -int HandleIconsCommands(const CommandLine &parsed_command_line) { +int HandleIconsCommands(const CommandLine& parsed_command_line) { return 0; } @@ -83,7 +62,7 @@ bool CheckMachineLevelInstall() { return false; } -void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) { +void PrepareRestartOnCrashEnviroment(const CommandLine& parsed_command_line) { } void RecordBreakpadStatusUMA(MetricsService* metrics) { |