| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 static std::string InitSharedInstanceLocaleOnly( | 131 static std::string InitSharedInstanceLocaleOnly( |
| 132 const std::string& pref_locale, Delegate* delegate); | 132 const std::string& pref_locale, Delegate* delegate); |
| 133 | 133 |
| 134 // Initialize the ResourceBundle using given file. The second argument | 134 // Initialize the ResourceBundle using given file. The second argument |
| 135 // controls whether or not ResourceBundle::LoadCommonResources is called. | 135 // controls whether or not ResourceBundle::LoadCommonResources is called. |
| 136 // This allows the use of this function in a sandbox without local file | 136 // This allows the use of this function in a sandbox without local file |
| 137 // access (as on Android). | 137 // access (as on Android). |
| 138 static void InitSharedInstanceWithPakFile(base::File file, | 138 static void InitSharedInstanceWithPakFile(base::File file, |
| 139 bool should_load_common_resources); | 139 bool should_load_common_resources); |
| 140 | 140 |
| 141 // Same as InitSharedInstanceWithPakFile, but uses a file region. |
| 142 static void InitSharedInstanceWithPakFileRegion( |
| 143 base::File pak_file, |
| 144 const base::File::Region& region, |
| 145 bool should_load_common_resources); |
| 146 |
| 141 // Initialize the ResourceBundle using given data pack path for testing. | 147 // Initialize the ResourceBundle using given data pack path for testing. |
| 142 static void InitSharedInstanceWithPakPath(const base::FilePath& path); | 148 static void InitSharedInstanceWithPakPath(const base::FilePath& path); |
| 143 | 149 |
| 144 // Delete the ResourceBundle for this process if it exists. | 150 // Delete the ResourceBundle for this process if it exists. |
| 145 static void CleanupSharedInstance(); | 151 static void CleanupSharedInstance(); |
| 146 | 152 |
| 147 // Returns true after the global resource loader instance has been created. | 153 // Returns true after the global resource loader instance has been created. |
| 148 static bool HasSharedInstance(); | 154 static bool HasSharedInstance(); |
| 149 | 155 |
| 150 // Return the global resource loader instance. | 156 // Return the global resource loader instance. |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 422 |
| 417 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); | 423 DISALLOW_COPY_AND_ASSIGN(ResourceBundle); |
| 418 }; | 424 }; |
| 419 | 425 |
| 420 } // namespace ui | 426 } // namespace ui |
| 421 | 427 |
| 422 // TODO(beng): Someday, maybe, get rid of this. | 428 // TODO(beng): Someday, maybe, get rid of this. |
| 423 using ui::ResourceBundle; | 429 using ui::ResourceBundle; |
| 424 | 430 |
| 425 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ | 431 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_H_ |
| OLD | NEW |