diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 16:26:03 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 16:26:03 +0000 |
commit | 6f33add36219e1faadea9d295b35d43841ebd508 (patch) | |
tree | bc5561b8d3cedeb13e504c971a7992a34e6d2353 /base/mac_util.h | |
parent | abf6c7a76bc68d0a01c1665e97972b0056654a26 (diff) | |
download | chromium_src-6f33add36219e1faadea9d295b35d43841ebd508.zip chromium_src-6f33add36219e1faadea9d295b35d43841ebd508.tar.gz chromium_src-6f33add36219e1faadea9d295b35d43841ebd508.tar.bz2 |
Add a macutil for the main app bundle and override
- provide apis to get and override the app bundle
- w/in the core code, use this api for fetching the bundle
- render sandbox config
- resource bundles
- test shell font
- w/in the unittest boot straps, use the mac util to override the bundle so resources can be found.
Review URL: http://codereview.chromium.org/28214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10798 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.h')
-rw-r--r-- | base/mac_util.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/base/mac_util.h b/base/mac_util.h index a6c81fa..371aa9e 100644 --- a/base/mac_util.h +++ b/base/mac_util.h @@ -6,6 +6,13 @@ #define BASE_MAC_UTIL_H_ struct FSRef; +class FilePath; + +#ifdef __OBJC__ +@class NSBundle; +#else +class NSBundle; +#endif #include <string> @@ -17,6 +24,16 @@ bool FSRefFromPath(const std::string& path, FSRef* ref); // Returns true if the application is running from a bundle bool AmIBundled(); +// Returns the main bundle or the override, used for code that needs +// to fetch resources from bundles, but work within a unittest where we +// aren't a bundle. +NSBundle* MainAppBundle(); + +// Set the bundle that MainAppBundle will return, overriding the default value +// (Restore the default by calling SetOverrideAppBundle(nil)). +void SetOverrideAppBundle(NSBundle* bundle); +void SetOverrideAppBundlePath(const FilePath& file_path); + } // namespace mac_util #endif // BASE_MAC_UTIL_H_ |