Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: chrome/common/resource_bundle.h

Issue 28171: Wire up resource bundles on the mac:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/resource_bundle.h
===================================================================
--- chrome/common/resource_bundle.h (revision 10428)
+++ chrome/common/resource_bundle.h (working copy)
@@ -19,10 +19,12 @@
#include "base/lock.h"
#include "base/scoped_ptr.h"
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_MACOSX)
namespace base {
class DataPack;
};
+#endif
+#if defined(OS_LINUX)
typedef struct _GdkPixbuf GdkPixbuf;
#endif
class ChromeFont;
@@ -48,6 +50,8 @@
};
// Initialize the ResourceBundle for this process.
+ // NOTE: Mac ignores this and always loads up resources for the language
+ // defined by the Cocoa UI (ie-NSBundle does the langange work).
static void InitSharedInstance(const std::wstring& pref_locale);
// Delete the ResourceBundle for this process if it exists.
@@ -120,12 +124,9 @@
#if defined(OS_WIN)
// Windows stores resources in DLLs, which are managed by HINSTANCE.
typedef HINSTANCE DataHandle;
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_MACOSX)
// Linux uses base::DataPack.
typedef base::DataPack* DataHandle;
-#elif defined(OS_MACOSX)
- // TODO(port): Implement resource loading on OS X.
- typedef void* DataHandle;
#endif
// Ctor/dtor are private, since we're a singleton.

Powered by Google App Engine
This is Rietveld 408576698