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

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

Issue 10387010: Select theme resources from ResourceBundle at requested scale factor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win compile errors. 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(), NULL); 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::SCALE_FACTOR_100P);
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.
102 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 102 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
103 103
104 // Disk image installation is sort of a first-run task, so it shares the 104 // Disk image installation is sort of a first-run task, so it shares the
105 // kNoFirstRun switch. 105 // kNoFirstRun switch.
106 // 106 //
107 // This needs to be done after the resource bundle is initialized (for 107 // This needs to be done after the resource bundle is initialized (for
(...skipping 26 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698