OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |