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

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: Merge with master. 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // have the strings avaiable for localization. 88 // have the strings avaiable for localization.
89 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 89 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
90 // to enforce the application locale. 90 // to enforce the application locale.
91 const std::string loaded_locale = 91 const std::string loaded_locale =
92 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); 92 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL);
93 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 93 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
94 94
95 FilePath resources_pack_path; 95 FilePath resources_pack_path;
96 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 96 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
97 ResourceBundle::GetSharedInstance().AddDataPack( 97 ResourceBundle::GetSharedInstance().AddDataPack(
98 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); 98 resources_pack_path, ui::SCALE_FACTOR_100P);
99 } 99 }
100 100
101 // This is a no-op if the KeystoneRegistration framework is not present. 101 // This is a no-op if the KeystoneRegistration framework is not present.
102 // The framework is only distributed with branded Google Chrome builds. 102 // The framework is only distributed with branded Google Chrome builds.
103 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 103 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
104 104
105 // Disk image installation is sort of a first-run task, so it shares the 105 // Disk image installation is sort of a first-run task, so it shares the
106 // kNoFirstRun switch. 106 // kNoFirstRun switch.
107 // 107 //
108 // This needs to be done after the resource bundle is initialized (for 108 // This needs to be done after the resource bundle is initialized (for
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const int kKeychainReauthorizeMaxTries = 2; 146 const int kKeychainReauthorizeMaxTries = 2;
147 147
148 chrome::browser::mac::KeychainReauthorizeIfNeeded( 148 chrome::browser::mac::KeychainReauthorizeIfNeeded(
149 keychain_reauthorize_pref, kKeychainReauthorizeMaxTries); 149 keychain_reauthorize_pref, kKeychainReauthorizeMaxTries);
150 } 150 }
151 151
152 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 152 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
153 AppController* appController = [NSApp delegate]; 153 AppController* appController = [NSApp delegate];
154 [appController didEndMainMessageLoop]; 154 [appController didEndMainMessageLoop];
155 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698