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

Side by Side Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 10270023: Add new ResourceBundle::Delegate interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/chrome_browser_main_mac.h" 5 #include "chrome/browser/chrome_browser_main_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (!parameters().ui_task) { 81 if (!parameters().ui_task) {
82 // The browser process only wants to support the language Cocoa will use, 82 // The browser process only wants to support the language Cocoa will use,
83 // so force the app locale to be overriden with that value. 83 // so force the app locale to be overriden with that value.
84 l10n_util::OverrideLocaleWithCocoaLocale(); 84 l10n_util::OverrideLocaleWithCocoaLocale();
85 85
86 // Before we load the nib, we need to start up the resource bundle so we 86 // Before we load the nib, we need to start up the resource bundle so we
87 // have the strings avaiable for localization. 87 // have the strings avaiable for localization.
88 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 88 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
89 // to enforce the application locale. 89 // to enforce the application locale.
90 const std::string loaded_locale = 90 const std::string loaded_locale =
91 ResourceBundle::InitSharedInstanceWithLocale(std::string()); 91 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL);
92 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 92 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
93 93
94 FilePath resources_pack_path; 94 FilePath resources_pack_path;
95 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 95 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
96 ResourceBundle::GetSharedInstance().AddDataPack( 96 ResourceBundle::GetSharedInstance().AddDataPack(
97 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); 97 resources_pack_path, ui::ResourceHandle::kScaleFactor100x);
98 } 98 }
99 99
100 // This is a no-op if the KeystoneRegistration framework is not present. 100 // This is a no-op if the KeystoneRegistration framework is not present.
101 // The framework is only distributed with branded Google Chrome builds. 101 // The framework is only distributed with branded Google Chrome builds.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Prevent Cocoa from turning command-line arguments into 134 // Prevent Cocoa from turning command-line arguments into
135 // |-application:openFiles:|, since we already handle them directly. 135 // |-application:openFiles:|, since we already handle them directly.
136 [[NSUserDefaults standardUserDefaults] 136 [[NSUserDefaults standardUserDefaults]
137 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; 137 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
138 } 138 }
139 139
140 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 140 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
141 AppController* appController = [NSApp delegate]; 141 AppController* appController = [NSApp delegate];
142 [appController didEndMainMessageLoop]; 142 [appController didEndMainMessageLoop];
143 } 143 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts_gtk.cc ('k') | chrome/browser/diagnostics/diagnostics_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698