| 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 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Get a localized string given a message id. Returns an empty | 231 // Get a localized string given a message id. Returns an empty |
| 232 // string if the message_id is not found. | 232 // string if the message_id is not found. |
| 233 base::string16 GetLocalizedString(int message_id); | 233 base::string16 GetLocalizedString(int message_id); |
| 234 | 234 |
| 235 // Returns the font list for the specified style. | 235 // Returns the font list for the specified style. |
| 236 const gfx::FontList& GetFontList(FontStyle style); | 236 const gfx::FontList& GetFontList(FontStyle style); |
| 237 | 237 |
| 238 // Returns the font for the specified style. | 238 // Returns the font for the specified style. |
| 239 const gfx::Font& GetFont(FontStyle style); | 239 const gfx::Font& GetFont(FontStyle style); |
| 240 | 240 |
| 241 // Returns a bold font style if it looks good for the current platform. |
| 242 // Bolding is currently omitted on Linux Aura. |
| 243 static FontStyle BoldOnlyIfItLooksGood(); |
| 244 |
| 241 // Resets and reloads the cached fonts. This is useful when the fonts of the | 245 // Resets and reloads the cached fonts. This is useful when the fonts of the |
| 242 // system have changed, for example, when the locale has changed. | 246 // system have changed, for example, when the locale has changed. |
| 243 void ReloadFonts(); | 247 void ReloadFonts(); |
| 244 | 248 |
| 245 // Overrides the path to the pak file from which the locale resources will be | 249 // Overrides the path to the pak file from which the locale resources will be |
| 246 // loaded. Pass an empty path to undo. | 250 // loaded. Pass an empty path to undo. |
| 247 void OverrideLocalePakForTest(const base::FilePath& pak_path); | 251 void OverrideLocalePakForTest(const base::FilePath& pak_path); |
| 248 | 252 |
| 249 // Returns the full pathname of the locale file to load. May return an empty | 253 // Returns the full pathname of the locale file to load. May return an empty |
| 250 // string if no locale data files are found and |test_file_exists| is true. | 254 // string if no locale data files are found and |test_file_exists| is true. |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 398 |
| 395 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 399 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
| 396 }; | 400 }; |
| 397 | 401 |
| 398 } // namespace ui | 402 } // namespace ui |
| 399 | 403 |
| 400 // TODO(beng): Someday, maybe, get rid of this. | 404 // TODO(beng): Someday, maybe, get rid of this. |
| 401 using ui::ResourceBundle; | 405 using ui::ResourceBundle; |
| 402 | 406 |
| 403 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 407 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| OLD | NEW |