summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/views/frame/aero_glass_non_client_view.cc6
-rw-r--r--chrome/browser/views/frame/opaque_non_client_view.cc6
-rw-r--r--chrome/browser/views/old_frames/vista_frame.cc7
-rw-r--r--chrome/browser/views/old_frames/xp_frame.cc13
-rw-r--r--chrome/common/resource_bundle.cc7
5 files changed, 21 insertions, 18 deletions
diff --git a/chrome/browser/views/frame/aero_glass_non_client_view.cc b/chrome/browser/views/frame/aero_glass_non_client_view.cc
index 3311c7b..210cdb1 100644
--- a/chrome/browser/views/frame/aero_glass_non_client_view.cc
+++ b/chrome/browser/views/frame/aero_glass_non_client_view.cc
@@ -424,9 +424,9 @@ void AeroGlassNonClientView::InitClass() {
if (!initialized) {
resources_ = new AeroGlassWindowResources;
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO);
- if (!image->isNull())
- distributor_logo_ = *image;
+#if defined(GOOGLE_CHROME_BUILD)
+ distributor_logo_ = *rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO);
+#endif
initialized = true;
}
diff --git a/chrome/browser/views/frame/opaque_non_client_view.cc b/chrome/browser/views/frame/opaque_non_client_view.cc
index 2033abb..cef4f8b 100644
--- a/chrome/browser/views/frame/opaque_non_client_view.cc
+++ b/chrome/browser/views/frame/opaque_non_client_view.cc
@@ -1024,9 +1024,9 @@ void OpaqueNonClientView::InitClass() {
inactive_resources_ = new InactiveWindowResources;
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT);
- if (!image->isNull())
- distributor_logo_ = *image;
+#if defined(GOOGLE_CHROME_BUILD)
+ distributor_logo_ = *rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT);
+#endif
app_top_left_ = *rb.GetBitmapNamed(IDR_APP_TOP_LEFT);
app_top_center_ = *rb.GetBitmapNamed(IDR_APP_TOP_CENTER);
diff --git a/chrome/browser/views/old_frames/vista_frame.cc b/chrome/browser/views/old_frames/vista_frame.cc
index d671eee..0bc1714 100644
--- a/chrome/browser/views/old_frames/vista_frame.cc
+++ b/chrome/browser/views/old_frames/vista_frame.cc
@@ -426,13 +426,12 @@ void VistaFrame::Init() {
frame_view_->AddChildView(off_the_record_image_);
}
- SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO);
- if (!image->isNull()) {
+#if defined(GOOGLE_CHROME_BUILD)
distributor_logo_ = new views::ImageView();
frame_view_->AddViewToDropList(distributor_logo_);
- distributor_logo_->SetImage(image);
+ distributor_logo_->SetImage(rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO));
frame_view_->AddChildView(distributor_logo_);
- }
+#endif
tab_contents_container_ = new TabContentsContainerView();
frame_view_->AddChildView(tab_contents_container_);
diff --git a/chrome/browser/views/old_frames/xp_frame.cc b/chrome/browser/views/old_frames/xp_frame.cc
index 5720782..ca365b2 100644
--- a/chrome/browser/views/old_frames/xp_frame.cc
+++ b/chrome/browser/views/old_frames/xp_frame.cc
@@ -450,13 +450,12 @@ void XPFrame::Init() {
frame_view_->AddViewToDropList(off_the_record_image_);
}
- SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT);
- if (!image->isNull()) {
- distributor_logo_ = new views::ImageView();
- frame_view_->AddViewToDropList(distributor_logo_);
- distributor_logo_->SetImage(image);
- frame_view_->AddChildView(distributor_logo_);
- }
+#if defined(GOOGLE_CHROME_BUILD)
+ distributor_logo_ = new views::ImageView();
+ frame_view_->AddViewToDropList(distributor_logo_);
+ distributor_logo_->SetImage(rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT));
+ frame_view_->AddChildView(distributor_logo_);
+#endif
min_button_ = new views::Button();
min_button_->SetListener(this, MINIATURIZE_TAG);
diff --git a/chrome/common/resource_bundle.cc b/chrome/common/resource_bundle.cc
index f6a47b8..2676bd6 100644
--- a/chrome/common/resource_bundle.cc
+++ b/chrome/common/resource_bundle.cc
@@ -171,8 +171,13 @@ SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) {
// Handle the case where loading the bitmap failed.
if (!bitmap) {
LOG(WARNING) << "Unable to load bitmap with id " << resource_id;
+ NOTREACHED(); // Want to assert in debug mode.
if (!empty_bitmap) {
- empty_bitmap = new SkBitmap();
+ // The placeholder bitmap is bright red so people notice the problem.
+ empty_bitmap = new SkBitmap();
+ empty_bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
+ empty_bitmap->allocPixels();
+ empty_bitmap->eraseARGB(255, 255, 0, 0);
}
return empty_bitmap;
}