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

Side by Side Diff: ui/base/resource/resource_bundle_mac.mm

Issue 9307110: Rename _large.grd to _2x.grd (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/resource/resource_bundle_posix.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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // static 44 // static
45 FilePath ResourceBundle::GetResourcesFilePath() { 45 FilePath ResourceBundle::GetResourcesFilePath() {
46 return GetResourcesPakFilePath(@"chrome", nil); 46 return GetResourcesPakFilePath(@"chrome", nil);
47 } 47 }
48 48
49 // static 49 // static
50 FilePath ResourceBundle::GetLargeIconResourcesFilePath() { 50 FilePath ResourceBundle::GetLargeIconResourcesFilePath() {
51 // Only load the large resource pak when running on 10.7 or later. 51 // Only load the large resource pak when running on 10.7 or later.
52 if (base::mac::IsOSLionOrLater()) 52 if (base::mac::IsOSLionOrLater())
53 return GetResourcesPakFilePath(@"theme_resources_large", nil); 53 return GetResourcesPakFilePath(@"theme_resources_2x", nil);
54 else 54 else
55 return FilePath(); 55 return FilePath();
56 } 56 }
57 57
58 // static 58 // static
59 FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { 59 FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) {
60 NSString* mac_locale = base::SysUTF8ToNSString(app_locale); 60 NSString* mac_locale = base::SysUTF8ToNSString(app_locale);
61 61
62 // Mac OS X uses "_" instead of "-", so swap to get a Mac-style value. 62 // Mac OS X uses "_" instead of "-", so swap to get a Mac-style value.
63 mac_locale = [mac_locale stringByReplacingOccurrencesOfString:@"-" 63 mac_locale = [mac_locale stringByReplacingOccurrencesOfString:@"-"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 images_[resource_id] = image; 125 images_[resource_id] = image;
126 return *image; 126 return *image;
127 } 127 }
128 128
129 LOG(WARNING) << "Unable to load image with id " << resource_id; 129 LOG(WARNING) << "Unable to load image with id " << resource_id;
130 NOTREACHED(); // Want to assert in debug mode. 130 NOTREACHED(); // Want to assert in debug mode.
131 return *GetEmptyImage(); 131 return *GetEmptyImage();
132 } 132 }
133 133
134 } // namespace ui 134 } // namespace ui
OLDNEW
« no previous file with comments | « tools/gritsettings/resource_ids ('k') | ui/base/resource/resource_bundle_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698