summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main_mac.mm
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 20:33:05 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 20:33:05 +0000
commit885b72726cd788273b305da33d04c65cfa130d09 (patch)
treebb23ed9f0f54655773ec102b10eb234c69090f0e /chrome/browser/browser_main_mac.mm
parente56861937b3bdea9ecafc082f6dd29c52bd16bee (diff)
downloadchromium_src-885b72726cd788273b305da33d04c65cfa130d09.zip
chromium_src-885b72726cd788273b305da33d04c65cfa130d09.tar.gz
chromium_src-885b72726cd788273b305da33d04c65cfa130d09.tar.bz2
Move the menu bar l10n into the xib file.
Localize the menu bar titles. Have the browser platform delegate startup the resource bundle system so we can fetch localization data. Make l10n_util::GetApplicationLocale return what cocoa says for the language so we match what the UI is using. TEST=everything still works. BUG=17380 Review URL: http://codereview.chromium.org/164413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_mac.mm')
-rw-r--r--chrome/browser/browser_main_mac.mm13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index b532742..d3041cc 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -3,9 +3,11 @@
// found in the LICENSE file.
#import <Cocoa/Cocoa.h>
+#include "app/resource_bundle.h"
#include "base/command_line.h"
#import "chrome/app/keystone_glue.h"
#include "chrome/browser/browser_main_win.h"
+#include "chrome/common/main_function_params.h"
#include "chrome/common/result_codes.h"
namespace Platform {
@@ -20,8 +22,17 @@ 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 MainFunctionParams& parameters) {
[NSApplication sharedApplication];
+ // Before we load the nib, we need to start up the resource bundle so we have
+ // the strings avaiable for localization.
+ if (!parameters.ui_task) {
+ ResourceBundle::InitSharedInstance(std::wstring());
+ // We only load the theme resources in the browser process, since this is
+ // the browser process, load them.
+ ResourceBundle::GetSharedInstance().LoadThemeResources();
+ }
+ // Now load the nib.
[NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
// This is a no-op if the KeystoneRegistration framework is not present.