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

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

Issue 1585013002: MacViews: Use Cocoa folder icons in tree views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (!parameters().ui_task) { 100 if (!parameters().ui_task) {
101 // The browser process only wants to support the language Cocoa will use, 101 // The browser process only wants to support the language Cocoa will use,
102 // so force the app locale to be overriden with that value. 102 // so force the app locale to be overriden with that value.
103 l10n_util::OverrideLocaleWithCocoaLocale(); 103 l10n_util::OverrideLocaleWithCocoaLocale();
104 } 104 }
105 105
106 // Before we load the nib, we need to start up the resource bundle so we 106 // Before we load the nib, we need to start up the resource bundle so we
107 // have the strings avaiable for localization. 107 // have the strings avaiable for localization.
108 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 108 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
109 // to enforce the application locale. 109 // to enforce the application locale.
110 resource_delegate_.reset(new ui::MacResourceDelegate());
110 const std::string loaded_locale = 111 const std::string loaded_locale =
111 ui::ResourceBundle::InitSharedInstanceWithLocale( 112 ui::ResourceBundle::InitSharedInstanceWithLocale(
112 std::string(), NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 113 std::string(), resource_delegate_.get(),
114 ui::ResourceBundle::LOAD_COMMON_RESOURCES);
113 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 115 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
114 116
115 base::FilePath resources_pack_path; 117 base::FilePath resources_pack_path;
116 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 118 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
117 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 119 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
118 resources_pack_path, ui::SCALE_FACTOR_NONE); 120 resources_pack_path, ui::SCALE_FACTOR_NONE);
119 121
120 // This is a no-op if the KeystoneRegistration framework is not present. 122 // This is a no-op if the KeystoneRegistration framework is not present.
121 // The framework is only distributed with branded Google Chrome builds. 123 // The framework is only distributed with branded Google Chrome builds.
122 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 124 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // counting and reporting of profiles. Make sure, assuming KeyStone 197 // counting and reporting of profiles. Make sure, assuming KeyStone
196 // is active, that it happened. 198 // is active, that it happened.
197 CHECK(![KeystoneGlue defaultKeystoneGlue] || 199 CHECK(![KeystoneGlue defaultKeystoneGlue] ||
198 [[KeystoneGlue defaultKeystoneGlue] isRegisteredAndActive]); 200 [[KeystoneGlue defaultKeystoneGlue] isRegisteredAndActive]);
199 } 201 }
200 202
201 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 203 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
202 AppController* appController = [NSApp delegate]; 204 AppController* appController = [NSApp delegate];
203 [appController didEndMainMessageLoop]; 205 [appController didEndMainMessageLoop];
204 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698