Lines Matching refs:resource_bundle
5 #include "ui/base/resource/resource_bundle.h"
176 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
188 resource_bundle->AddDataPackFromPath(pack_path, pack_scale_factor);
199 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
209 EXPECT_FALSE(resource_bundle->LocaleDataPakExists(locale));
210 EXPECT_EQ("", resource_bundle->LoadLocaleResources(locale));
217 EXPECT_TRUE(resource_bundle->LocaleDataPakExists(locale));
218 EXPECT_EQ(locale, resource_bundle->LoadLocaleResources(locale));
223 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
225 gfx::Image empty_image = resource_bundle->GetEmptyImage();
232 gfx::Image result = resource_bundle->GetImageNamed(resource_id);
238 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
240 gfx::Image empty_image = resource_bundle->GetEmptyImage();
252 gfx::Image result = resource_bundle->GetNativeImageNamed(resource_id);
258 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
272 resource_bundle->LoadDataResourceBytesForScale(resource_id, scale_factor);
278 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
291 base::StringPiece result = resource_bundle->GetRawDataResource(
298 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
307 string16 result = resource_bundle->GetLocalizedString(resource_id);
313 ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
323 &resource_bundle->GetFontList(ui::ResourceBundle::BaseFont);
327 &resource_bundle->GetFont(ui::ResourceBundle::BaseFont);
332 ResourceBundle* resource_bundle = CreateResourceBundle(NULL);
335 EXPECT_TRUE(resource_bundle->LocaleDataPakExists("en-US"));
336 EXPECT_FALSE(resource_bundle->LocaleDataPakExists("not_a_real_locale"));
360 ui::ResourceBundle* resource_bundle = CreateResourceBundle(NULL);
363 resource_bundle->LoadTestResources(base::FilePath(), locale_path);
364 return resource_bundle;
387 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
388 resource_bundle->AddDataPackFromPath(data_path, SCALE_FACTOR_100P);
391 EXPECT_EQ(NULL, resource_bundle->LoadDataResourceBytes(
395 resource_bundle->AddDataPackFromPath(
398 EXPECT_EQ(NULL, resource_bundle->LoadDataResourceBytes(
414 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
415 resource_bundle->AddDataPackFromPath(data_path, SCALE_FACTOR_100P);
416 resource_bundle->AddDataPackFromPath(data_2x_path, SCALE_FACTOR_200P);
420 EXPECT_EQ("this is id 4", resource_bundle->GetRawDataResourceForScale(4,
422 EXPECT_EQ("this is id 4 2x", resource_bundle->GetRawDataResourceForScale(4,
427 EXPECT_EQ("this is id 6", resource_bundle->GetRawDataResourceForScale(6,
429 EXPECT_EQ("this is id 6", resource_bundle->GetRawDataResourceForScale(6,
444 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
445 resource_bundle->AddDataPackFromPath(data_1x_path, SCALE_FACTOR_100P);
446 resource_bundle->AddDataPackFromPath(data_2x_path, SCALE_FACTOR_200P);
448 EXPECT_EQ(SCALE_FACTOR_200P, resource_bundle
450 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);
489 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
490 resource_bundle->AddDataPackFromPath(data_path, SCALE_FACTOR_100P);
491 resource_bundle->AddDataPackFromPath(data_2x_path, SCALE_FACTOR_200P);
493 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);
522 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
523 resource_bundle->AddDataPackFromPath(data_path, SCALE_FACTOR_100P);
524 resource_bundle->AddDataPackFromPath(data_140P_path, SCALE_FACTOR_140P);
525 resource_bundle->AddDataPackFromPath(data_180P_path, SCALE_FACTOR_180P);
528 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);
544 ResourceBundle* resource_bundle = CreateResourceBundleWithEmptyLocalePak();
545 resource_bundle->AddDataPackFromPath(data_default_path, SCALE_FACTOR_NONE);
547 gfx::ImageSkia* image_skia = resource_bundle->GetImageSkiaNamed(3);