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

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: Addressed review comments. 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
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.h ('k') | chrome/browser/resource_delegate_mac.h » ('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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const std::string loaded_locale = 110 const std::string loaded_locale =
111 ui::ResourceBundle::InitSharedInstanceWithLocale( 111 ui::ResourceBundle::InitSharedInstanceWithLocale(
112 std::string(), NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 112 std::string(), &resource_delegate_,
113 ui::ResourceBundle::LOAD_COMMON_RESOURCES);
113 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 114 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
114 115
115 base::FilePath resources_pack_path; 116 base::FilePath resources_pack_path;
116 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 117 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
117 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 118 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
118 resources_pack_path, ui::SCALE_FACTOR_NONE); 119 resources_pack_path, ui::SCALE_FACTOR_NONE);
119 120
120 // This is a no-op if the KeystoneRegistration framework is not present. 121 // This is a no-op if the KeystoneRegistration framework is not present.
121 // The framework is only distributed with branded Google Chrome builds. 122 // The framework is only distributed with branded Google Chrome builds.
122 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 123 [[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 196 // counting and reporting of profiles. Make sure, assuming KeyStone
196 // is active, that it happened. 197 // is active, that it happened.
197 CHECK(![KeystoneGlue defaultKeystoneGlue] || 198 CHECK(![KeystoneGlue defaultKeystoneGlue] ||
198 [[KeystoneGlue defaultKeystoneGlue] isRegisteredAndActive]); 199 [[KeystoneGlue defaultKeystoneGlue] isRegisteredAndActive]);
199 } 200 }
200 201
201 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 202 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
202 AppController* appController = [NSApp delegate]; 203 AppController* appController = [NSApp delegate];
203 [appController didEndMainMessageLoop]; 204 [appController didEndMainMessageLoop];
204 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.h ('k') | chrome/browser/resource_delegate_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698