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

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

Issue 10686005: Add methods to add DataPack from open files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Before we load the nib, we need to start up the resource bundle so we 124 // Before we load the nib, we need to start up the resource bundle so we
125 // have the strings avaiable for localization. 125 // have the strings avaiable for localization.
126 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 126 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
127 // to enforce the application locale. 127 // to enforce the application locale.
128 const std::string loaded_locale = 128 const std::string loaded_locale =
129 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); 129 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL);
130 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 130 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
131 131
132 FilePath resources_pack_path; 132 FilePath resources_pack_path;
133 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 133 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
134 ResourceBundle::GetSharedInstance().AddDataPack( 134 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
135 resources_pack_path, ui::SCALE_FACTOR_100P); 135 resources_pack_path, ui::SCALE_FACTOR_100P);
136 } 136 }
137 137
138 // This is a no-op if the KeystoneRegistration framework is not present. 138 // This is a no-op if the KeystoneRegistration framework is not present.
139 // The framework is only distributed with branded Google Chrome builds. 139 // The framework is only distributed with branded Google Chrome builds.
140 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 140 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
141 141
142 // Disk image installation is sort of a first-run task, so it shares the 142 // Disk image installation is sort of a first-run task, so it shares the
143 // kNoFirstRun switch. 143 // kNoFirstRun switch.
144 // 144 //
(...skipping 27 matching lines...) Expand all
172 // Prevent Cocoa from turning command-line arguments into 172 // Prevent Cocoa from turning command-line arguments into
173 // |-application:openFiles:|, since we already handle them directly. 173 // |-application:openFiles:|, since we already handle them directly.
174 [[NSUserDefaults standardUserDefaults] 174 [[NSUserDefaults standardUserDefaults]
175 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; 175 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
176 } 176 }
177 177
178 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 178 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
179 AppController* appController = [NSApp delegate]; 179 AppController* appController = [NSApp delegate];
180 [appController didEndMainMessageLoop]; 180 [appController didEndMainMessageLoop];
181 } 181 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698