OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ANDROID_H_ | 5 #ifndef UI_BASE_RESOURCE_RESOURCE_BUNDLE_ANDROID_H_ |
6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_ANDROID_H_ | 6 #define UI_BASE_RESOURCE_RESOURCE_BUNDLE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 const base::FilePath& disk_file_path); | 21 const base::FilePath& disk_file_path); |
22 | 22 |
23 // Returns the file descriptor and region for resources.pak. | 23 // Returns the file descriptor and region for resources.pak. |
24 UI_BASE_EXPORT int GetMainAndroidPackFd( | 24 UI_BASE_EXPORT int GetMainAndroidPackFd( |
25 base::MemoryMappedFile::Region* out_region); | 25 base::MemoryMappedFile::Region* out_region); |
26 | 26 |
27 // Returns the file descriptor and region for chrome_100_percent.pak | 27 // Returns the file descriptor and region for chrome_100_percent.pak |
28 UI_BASE_EXPORT int GetCommonResourcesPackFd( | 28 UI_BASE_EXPORT int GetCommonResourcesPackFd( |
29 base::MemoryMappedFile::Region* out_region); | 29 base::MemoryMappedFile::Region* out_region); |
30 | 30 |
31 // Checks whether the locale data pak is contained within the .apk. | 31 // Returns the path within the apk for the given locale's .pak file, or an |
32 bool AssetContainedInApk(const std::string& filename); | 32 // empty string if it doesn't exist. |
| 33 // Only locale paks for the active Android language can be retrieved. |
| 34 UI_BASE_EXPORT std::string GetPathForAndroidLocalePakWithinApk( |
| 35 const std::string& locale); |
33 | 36 |
34 bool RegisterResourceBundleAndroid(JNIEnv* env); | 37 bool RegisterResourceBundleAndroid(JNIEnv* env); |
35 | 38 |
36 } // namespace ui | 39 } // namespace ui |
37 | 40 |
38 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_ANDROID_H_ | 41 #endif // UI_BASE_RESOURCE_RESOURCE_BUNDLE_ANDROID_H_ |
OLD | NEW |