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

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

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Before we load the nib, we need to start up the resource bundle so we 85 // Before we load the nib, we need to start up the resource bundle so we
86 // have the strings avaiable for localization. 86 // have the strings avaiable for localization.
87 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 87 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
88 // to enforce the application locale. 88 // to enforce the application locale.
89 const std::string loaded_locale = 89 const std::string loaded_locale =
90 ResourceBundle::InitSharedInstanceWithLocale(std::string()); 90 ResourceBundle::InitSharedInstanceWithLocale(std::string());
91 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 91 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
92 92
93 FilePath resources_pack_path; 93 FilePath resources_pack_path;
94 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 94 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
95 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path); 95 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path, 1.0);
96 } 96 }
97 97
98 // This is a no-op if the KeystoneRegistration framework is not present. 98 // This is a no-op if the KeystoneRegistration framework is not present.
99 // The framework is only distributed with branded Google Chrome builds. 99 // The framework is only distributed with branded Google Chrome builds.
100 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 100 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
101 101
102 // Disk image installation is sort of a first-run task, so it shares the 102 // Disk image installation is sort of a first-run task, so it shares the
103 // kNoFirstRun switch. 103 // kNoFirstRun switch.
104 // 104 //
105 // This needs to be done after the resource bundle is initialized (for 105 // This needs to be done after the resource bundle is initialized (for
(...skipping 26 matching lines...) Expand all
132 // Prevent Cocoa from turning command-line arguments into 132 // Prevent Cocoa from turning command-line arguments into
133 // |-application:openFiles:|, since we already handle them directly. 133 // |-application:openFiles:|, since we already handle them directly.
134 [[NSUserDefaults standardUserDefaults] 134 [[NSUserDefaults standardUserDefaults]
135 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; 135 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
136 } 136 }
137 137
138 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 138 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
139 AppController* appController = [NSApp delegate]; 139 AppController* appController = [NSApp delegate];
140 [appController didEndMainMessageLoop]; 140 [appController didEndMainMessageLoop];
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698