diff options
author | benl@chromium.org <benl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 16:39:46 +0000 |
---|---|---|
committer | benl@chromium.org <benl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 16:39:46 +0000 |
commit | fb66f9deac79dfe9e0eedc184705e824ae9144c3 (patch) | |
tree | 019f94cbb5f93009383182cffe8184009adcb6e6 /app | |
parent | ccf440ed5cf9f0a3368457c73a7496a900e03c06 (diff) | |
download | chromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.zip chromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.tar.gz chromium_src-fb66f9deac79dfe9e0eedc184705e824ae9144c3.tar.bz2 |
Added USE_GDK, set when either TOOLKIT_GTK or TOOLKIT_VIEWS is set but
not OS_WIN.
Added USE_X11. Set when OS_LINUX or OS_FREEBSD is set.
Added USE_BASE_DATA_PACK for base::DataPack usage, set for OS_MACOSX,
OS_LINUX or OS_FREEBSD.
Added USE_NSS for ... nss (for crypto). Windows and MacOS use
platform-specific libraries.
All of the above cause slightly odd formulations like:
#if defined(OS_WIN)
...
#elif defined(USE_BASE_DATA_PACK)
...
#endif
Possibly should also define USE_DLL_FOR_DATA, etc? Or something?
Wrapped various references to struct stat64 and stat64() to use struct
stat and stat() for FreeBSD - but a "man stat64" on Linux suggests
that we could do the same thing for at least Linux, too, and perhaps
eliminate the wrapper?
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/app.gyp | 3 | ||||
-rw-r--r-- | app/resource_bundle.h | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/app.gyp b/app/app.gyp index 3d027d6..71a72d0 100644 --- a/app/app.gyp +++ b/app/app.gyp @@ -238,6 +238,9 @@ }, 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/app/grit/<(RULE_INPUT_ROOT).h', + # TODO(benl) Generate this list from a helper script, like + # repack_locales_cmd in chrome.gyp (see TODO(mmoss)) + '<(SHARED_INTERMEDIATE_DIR)/app/<(RULE_INPUT_ROOT)_ar.pak', '<(SHARED_INTERMEDIATE_DIR)/app/<(RULE_INPUT_ROOT)_en-US.pak', ], 'action': ['python', '<@(_inputs)', '-i', '<(RULE_INPUT_PATH)', diff --git a/app/resource_bundle.h b/app/resource_bundle.h index 51a8ff6..52c85c5 100644 --- a/app/resource_bundle.h +++ b/app/resource_bundle.h @@ -20,12 +20,12 @@ #include "base/scoped_ptr.h" #include "base/string16.h" -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(USE_BASE_DATA_PACK) namespace base { class DataPack; } #endif -#if defined(OS_LINUX) +#if defined(USE_X11) typedef struct _GdkPixbuf GdkPixbuf; #endif namespace gfx { @@ -123,7 +123,7 @@ class ResourceBundle { #elif defined(OS_MACOSX) // Wrapper for GetBitmapNamed. Converts the bitmap to an autoreleased NSImage. NSImage* GetNSImageNamed(int resource_id); -#elif defined(OS_LINUX) +#elif defined(USE_X11) // Gets the GdkPixbuf with the specified resource_id, first by looking into // the theme data, than in the current module data if applicable. Returns a // pointer to a shared instance of the GdkPixbuf. This shared GdkPixbuf is @@ -160,7 +160,7 @@ class ResourceBundle { #if defined(OS_WIN) // Windows stores resources in DLLs, which are managed by HINSTANCE. typedef HINSTANCE DataHandle; -#elif defined(OS_LINUX) || defined(OS_MACOSX) +#elif defined(USE_BASE_DATA_PACK) // Linux uses base::DataPack. typedef base::DataPack* DataHandle; #endif @@ -208,7 +208,7 @@ class ResourceBundle { // ownership of the pointers. typedef std::map<int, SkBitmap*> SkImageMap; SkImageMap skia_images_; -#if defined(OS_LINUX) +#if defined(USE_X11) typedef std::map<int, GdkPixbuf*> GdkPixbufMap; GdkPixbufMap gdk_pixbufs_; #endif |