summaryrefslogtreecommitdiffstats
path: root/chrome/common/resource_bundle.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 20:40:48 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 20:40:48 +0000
commitf7f181f5b4b4cfa8d4882cccb3e349458084dbf6 (patch)
treefcb7074b4d754ae1f83fc6d2da42954662cb611f /chrome/common/resource_bundle.cc
parent94f957511b1a940454516a43acb730350fc6cad8 (diff)
downloadchromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.zip
chromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.tar.gz
chromium_src-f7f181f5b4b4cfa8d4882cccb3e349458084dbf6.tar.bz2
Fix our link madness on linux. We now properly link
webkit into unit_tests. There was also a problem with simple_clipboard_impl.cc which should only be compiled into test_shell. I can't remove mock_webkit_glue.cc until I verify that the mac build doesn't need it anymore. Review URL: http://codereview.chromium.org/19474 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_bundle.cc')
-rw-r--r--chrome/common/resource_bundle.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc
index c97f1b2..1e2538e 100644
--- a/chrome/common/resource_bundle.cc
+++ b/chrome/common/resource_bundle.cc
@@ -15,6 +15,9 @@
ResourceBundle* ResourceBundle::g_shared_instance_ = NULL;
+// TODO(port): InitSharedInstance and CleanupSharedInstance are portable, but
+// they need LoadLocaleResource and ~ResourceBundle implemented.
+#if defined(OS_WIN)
/* static */
void ResourceBundle::InitSharedInstance(const std::wstring& pref_locale) {
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
@@ -30,6 +33,7 @@ void ResourceBundle::CleanupSharedInstance() {
g_shared_instance_ = NULL;
}
}
+#endif
/* static */
ResourceBundle& ResourceBundle::GetSharedInstance() {
@@ -51,6 +55,8 @@ void ResourceBundle::FreeImages() {
skia_images_.clear();
}
+// TODO(port): LoadBitmap is portable, but it needs a LoadResourceBytes impl.
+#if defined(OS_WIN)
/* static */
SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) {
std::vector<unsigned char> raw_data, png_data;
@@ -71,6 +77,7 @@ SkBitmap* ResourceBundle::LoadBitmap(DataHandle data_handle, int resource_id) {
image_width,
image_height);
}
+#endif
SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) {
// Check to see if we already have the Skia image in the cache.
@@ -83,9 +90,15 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) {
scoped_ptr<SkBitmap> bitmap;
- // Try to load the bitmap from the theme data.
- if (theme_data_)
+ if (theme_data_) {
+#if defined(OS_WIN)
+ // TODO(port): We need to implement LoadBitmap before this can link.
+ // Try to load the bitmap from the theme data.
bitmap.reset(LoadBitmap(theme_data_, resource_id));
+#else
+ NOTIMPLEMENTED();
+#endif
+ }
#if defined(OS_WIN)
// TODO(port): refactor to remove this.