OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef APP_RESOURCE_BUNDLE_H_ | 5 #ifndef APP_RESOURCE_BUNDLE_H_ |
6 #define APP_RESOURCE_BUNDLE_H_ | 6 #define APP_RESOURCE_BUNDLE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // Like GetDataResource(), but avoids copying the resource. Instead, it | 107 // Like GetDataResource(), but avoids copying the resource. Instead, it |
108 // returns a StringPiece which points into the actual resource in the image. | 108 // returns a StringPiece which points into the actual resource in the image. |
109 base::StringPiece GetRawDataResource(int resource_id); | 109 base::StringPiece GetRawDataResource(int resource_id); |
110 | 110 |
111 // Get a localized string given a message id. Returns an empty | 111 // Get a localized string given a message id. Returns an empty |
112 // string if the message_id is not found. | 112 // string if the message_id is not found. |
113 string16 GetLocalizedString(int message_id); | 113 string16 GetLocalizedString(int message_id); |
114 | 114 |
115 // Returns the font for the specified style. | 115 // Returns the font for the specified style. |
116 gfx::Font GetFont(FontStyle style); | 116 const gfx::Font& GetFont(FontStyle style); |
117 | 117 |
118 #if defined(OS_WIN) | 118 #if defined(OS_WIN) |
119 // Loads and returns an icon from the theme dll. | 119 // Loads and returns an icon from the theme dll. |
120 HICON LoadThemeIcon(int icon_id); | 120 HICON LoadThemeIcon(int icon_id); |
121 | 121 |
122 // Loads and returns a cursor from the app module. | 122 // Loads and returns a cursor from the app module. |
123 HCURSOR LoadCursor(int cursor_id); | 123 HCURSOR LoadCursor(int cursor_id); |
124 #elif defined(OS_MACOSX) | 124 #elif defined(OS_MACOSX) |
125 // Wrapper for GetBitmapNamed. Converts the bitmap to an autoreleased NSImage. | 125 // Wrapper for GetBitmapNamed. Converts the bitmap to an autoreleased NSImage. |
126 NSImage* GetNSImageNamed(int resource_id); | 126 NSImage* GetNSImageNamed(int resource_id); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 scoped_ptr<gfx::Font> medium_bold_font_; | 221 scoped_ptr<gfx::Font> medium_bold_font_; |
222 scoped_ptr<gfx::Font> large_font_; | 222 scoped_ptr<gfx::Font> large_font_; |
223 scoped_ptr<gfx::Font> web_font_; | 223 scoped_ptr<gfx::Font> web_font_; |
224 | 224 |
225 static ResourceBundle* g_shared_instance_; | 225 static ResourceBundle* g_shared_instance_; |
226 | 226 |
227 DISALLOW_EVIL_CONSTRUCTORS(ResourceBundle); | 227 DISALLOW_EVIL_CONSTRUCTORS(ResourceBundle); |
228 }; | 228 }; |
229 | 229 |
230 #endif // APP_RESOURCE_BUNDLE_H_ | 230 #endif // APP_RESOURCE_BUNDLE_H_ |
OLD | NEW |