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

Side by Side Diff: ui/base/resource/resource_bundle.h

Issue 2311223003: [chromecast] Add ResourceBundle::LoadLocalizedResourceBytes(). (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « chromecast/common/cast_content_client.cc ('k') | ui/base/resource/resource_bundle.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 #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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // nearest the scale factor |scale_factor|. 224 // nearest the scale factor |scale_factor|.
225 // Use ResourceHandle::SCALE_FACTOR_NONE for scale independent image resources 225 // Use ResourceHandle::SCALE_FACTOR_NONE for scale independent image resources
226 // (such as wallpaper). 226 // (such as wallpaper).
227 base::StringPiece GetRawDataResourceForScale(int resource_id, 227 base::StringPiece GetRawDataResourceForScale(int resource_id,
228 ScaleFactor scale_factor) const; 228 ScaleFactor scale_factor) const;
229 229
230 // Get a localized string given a message id. Returns an empty 230 // Get a localized string given a message id. Returns an empty
231 // string if the message_id is not found. 231 // string if the message_id is not found.
232 base::string16 GetLocalizedString(int message_id); 232 base::string16 GetLocalizedString(int message_id);
233 233
234 // Get a localized resource (for example, localized image logo) given a
235 // resource id.
236 base::RefCountedMemory* GetLocalizedResourceBytes(int message_id);
byungchul 2016/09/06 20:54:54 LoadLocalizedResourceBytes(int resource_id)
237
234 // Returns a font list derived from the platform-specific "Base" font list. 238 // Returns a font list derived from the platform-specific "Base" font list.
235 // The result is always cached and exists for the lifetime of the process. 239 // The result is always cached and exists for the lifetime of the process.
236 const gfx::FontList& GetFontListWithDelta( 240 const gfx::FontList& GetFontListWithDelta(
237 int size_delta, 241 int size_delta,
238 gfx::Font::FontStyle style = gfx::Font::NORMAL, 242 gfx::Font::FontStyle style = gfx::Font::NORMAL,
239 gfx::Font::Weight weight = gfx::Font::Weight::NORMAL); 243 gfx::Font::Weight weight = gfx::Font::Weight::NORMAL);
240 244
241 // Returns the primary font from the FontList given by GetFontListWithDelta(). 245 // Returns the primary font from the FontList given by GetFontListWithDelta().
242 const gfx::Font& GetFontWithDelta( 246 const gfx::Font& GetFontWithDelta(
243 int size_delta, 247 int size_delta,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 422
419 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); 423 DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
420 }; 424 };
421 425
422 } // namespace ui 426 } // namespace ui
423 427
424 // TODO(beng): Someday, maybe, get rid of this. 428 // TODO(beng): Someday, maybe, get rid of this.
425 using ui::ResourceBundle; 429 using ui::ResourceBundle;
426 430
427 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ 431 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_
OLDNEW
« no previous file with comments | « chromecast/common/cast_content_client.cc ('k') | ui/base/resource/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698