OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // pointer to a shared empty placeholder bitmap so it will be visible what | 98 // pointer to a shared empty placeholder bitmap so it will be visible what |
99 // is missing. | 99 // is missing. |
100 SkBitmap* GetBitmapNamed(int resource_id); | 100 SkBitmap* GetBitmapNamed(int resource_id); |
101 | 101 |
102 // Loads the raw bytes of a data resource into |bytes|, | 102 // Loads the raw bytes of a data resource into |bytes|, |
103 // without doing any processing or interpretation of | 103 // without doing any processing or interpretation of |
104 // the resource. Returns whether we successfully read the resource. | 104 // the resource. Returns whether we successfully read the resource. |
105 RefCountedStaticMemory* LoadDataResourceBytes(int resource_id) const; | 105 RefCountedStaticMemory* LoadDataResourceBytes(int resource_id) const; |
106 | 106 |
107 // Return the contents of a resource in a StringPiece given the resource id. | 107 // Return the contents of a resource in a StringPiece given the resource id. |
108 base::StringPiece GetRawDataResource(int resource_id); | 108 base::StringPiece GetRawDataResource(int resource_id) const; |
109 | 109 |
110 // Get a localized string given a message id. Returns an empty | 110 // Get a localized string given a message id. Returns an empty |
111 // string if the message_id is not found. | 111 // string if the message_id is not found. |
112 string16 GetLocalizedString(int message_id); | 112 string16 GetLocalizedString(int message_id); |
113 | 113 |
114 // Returns the font for the specified style. | 114 // Returns the font for the specified style. |
115 const gfx::Font& GetFont(FontStyle style); | 115 const gfx::Font& GetFont(FontStyle style); |
116 | 116 |
117 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
118 // Loads and returns an icon from the app module. | 118 // Loads and returns an icon from the app module. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 scoped_ptr<gfx::Font> medium_bold_font_; | 258 scoped_ptr<gfx::Font> medium_bold_font_; |
259 scoped_ptr<gfx::Font> large_font_; | 259 scoped_ptr<gfx::Font> large_font_; |
260 scoped_ptr<gfx::Font> web_font_; | 260 scoped_ptr<gfx::Font> web_font_; |
261 | 261 |
262 static ResourceBundle* g_shared_instance_; | 262 static ResourceBundle* g_shared_instance_; |
263 | 263 |
264 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 264 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
265 }; | 265 }; |
266 | 266 |
267 #endif // APP_RESOURCE_BUNDLE_H_ | 267 #endif // APP_RESOURCE_BUNDLE_H_ |
OLD | NEW |