summaryrefslogtreecommitdiffstats
path: root/chrome/browser/xp_frame.cc
diff options
context:
space:
mode:
authorrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 17:01:42 +0000
committerrahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 17:01:42 +0000
commit0d9b46841a609c598ca8ded416e2adfca2be9d48 (patch)
tree4211bf9c20894b06a965ea8bfdb3a9a009cba80d /chrome/browser/xp_frame.cc
parente4f2d631670f61c442fca79ce08050a90fb35505 (diff)
downloadchromium_src-0d9b46841a609c598ca8ded416e2adfca2be9d48.zip
chromium_src-0d9b46841a609c598ca8ded416e2adfca2be9d48.tar.gz
chromium_src-0d9b46841a609c598ca8ded416e2adfca2be9d48.tar.bz2
Do not display "Google" in titlebar of Chromium builds.
- Create a new resource file that will contain Google Chrome specific resources. Ideally this new resource file should not be in the Chromium project at all but there doesnt seem to be any way to do conditional includes in vcproj files. So we ifdef its contents. - Make distributor logo optional. If we do not find it, we do not try to paint/layout logo. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/xp_frame.cc')
-rw-r--r--chrome/browser/xp_frame.cc37
1 files changed, 21 insertions, 16 deletions
diff --git a/chrome/browser/xp_frame.cc b/chrome/browser/xp_frame.cc
index bb2aefe..666d94b 100644
--- a/chrome/browser/xp_frame.cc
+++ b/chrome/browser/xp_frame.cc
@@ -476,10 +476,13 @@ void XPFrame::Init() {
frame_view_->AddViewToDropList(off_the_record_image_);
}
- distributor_logo_ = new ChromeViews::ImageView();
- frame_view_->AddViewToDropList(distributor_logo_);
- distributor_logo_->SetImage(rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT));
- frame_view_->AddChildView(distributor_logo_);
+ SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT);
+ if (!image->isNull()) {
+ distributor_logo_ = new ChromeViews::ImageView();
+ frame_view_->AddViewToDropList(distributor_logo_);
+ distributor_logo_->SetImage(image);
+ frame_view_->AddChildView(distributor_logo_);
+ }
min_button_ = new ChromeViews::Button();
min_button_->SetListener(this, MINIATURIZE_TAG);
@@ -717,18 +720,20 @@ void XPFrame::Layout() {
}
}
- if (IsZoomed()) {
- distributor_logo_->SetVisible(false);
- } else {
- CSize distributor_logo_size;
- distributor_logo_->GetPreferredSize(&distributor_logo_size);
- distributor_logo_->SetVisible(true);
- distributor_logo_->SetBounds(min_button_->GetX() -
- distributor_logo_size.cx -
- kDistributorLogoHorizontalOffset,
- kDistributorLogoVerticalOffset,
- distributor_logo_size.cx,
- distributor_logo_size.cy);
+ if (distributor_logo_) {
+ if (IsZoomed()) {
+ distributor_logo_->SetVisible(false);
+ } else {
+ CSize distributor_logo_size;
+ distributor_logo_->GetPreferredSize(&distributor_logo_size);
+ distributor_logo_->SetVisible(true);
+ distributor_logo_->SetBounds(min_button_->GetX() -
+ distributor_logo_size.cx -
+ kDistributorLogoHorizontalOffset,
+ kDistributorLogoVerticalOffset,
+ distributor_logo_size.cx,
+ distributor_logo_size.cy);
+ }
}
tabstrip_->SetBounds(tab_strip_x, top_margin - 1,