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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 FilePath GetLocaleFilePath(const std::string& app_locale, | 247 FilePath GetLocaleFilePath(const std::string& app_locale, |
248 bool test_file_exists); | 248 bool test_file_exists); |
249 | 249 |
250 // Returns the maximum scale factor currently loaded. | 250 // Returns the maximum scale factor currently loaded. |
251 // Returns SCALE_FACTOR_100P if no resource is loaded. | 251 // Returns SCALE_FACTOR_100P if no resource is loaded. |
252 ScaleFactor max_scale_factor() const { | 252 ScaleFactor max_scale_factor() const { |
253 return max_scale_factor_; | 253 return max_scale_factor_; |
254 } | 254 } |
255 | 255 |
256 private: | 256 private: |
257 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetPathForResourcePack); | 257 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetPathForLocalePack); |
258 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetPathForLocalePack); | 258 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetImageNamed); |
259 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetImageNamed); | 259 FRIEND_TEST_ALL_PREFIXES(ResourceBundleTest, DelegateGetNativeImageNamed); |
260 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetNativeImageNamed); | 260 |
261 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateLoadDataResourceBytes); | 261 friend class ResourceBundleImageTest; |
262 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetRawDataResource); | 262 friend class ResourceBundleTest; |
263 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetLocalizedString); | |
264 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, DelegateGetFont); | |
265 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, GetRawDataResource); | |
266 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LoadDataResourceBytes); | |
267 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LocaleDataPakExists); | |
268 FRIEND_TEST_ALL_PREFIXES(ResourceBundle, GetImageNamed); | |
269 | 263 |
270 class ResourceBundleImageSource; | 264 class ResourceBundleImageSource; |
271 friend class ResourceBundleImageSource; | 265 friend class ResourceBundleImageSource; |
272 | 266 |
273 // Ctor/dtor are private, since we're a singleton. | 267 // Ctor/dtor are private, since we're a singleton. |
274 explicit ResourceBundle(Delegate* delegate); | 268 explicit ResourceBundle(Delegate* delegate); |
275 ~ResourceBundle(); | 269 ~ResourceBundle(); |
276 | 270 |
277 // Free skia_images_. | 271 // Free skia_images_. |
278 void FreeImages(); | 272 void FreeImages(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 360 |
367 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 361 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
368 }; | 362 }; |
369 | 363 |
370 } // namespace ui | 364 } // namespace ui |
371 | 365 |
372 // TODO(beng): Someday, maybe, get rid of this. | 366 // TODO(beng): Someday, maybe, get rid of this. |
373 using ui::ResourceBundle; | 367 using ui::ResourceBundle; |
374 | 368 |
375 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 369 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
OLD | NEW |