diff options
| author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 17:01:42 +0000 |
|---|---|---|
| committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 17:01:42 +0000 |
| commit | 0d9b46841a609c598ca8ded416e2adfca2be9d48 (patch) | |
| tree | 4211bf9c20894b06a965ea8bfdb3a9a009cba80d /chrome/browser/views | |
| parent | e4f2d631670f61c442fca79ce08050a90fb35505 (diff) | |
| download | chromium_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/views')
| -rw-r--r-- | chrome/browser/views/frame/aero_glass_non_client_view.cc | 14 | ||||
| -rw-r--r-- | chrome/browser/views/frame/opaque_non_client_view.cc | 13 |
2 files changed, 21 insertions, 6 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 0e05ab9..d5d8472 100644 --- a/chrome/browser/views/frame/aero_glass_non_client_view.cc +++ b/chrome/browser/views/frame/aero_glass_non_client_view.cc @@ -248,8 +248,10 @@ int AeroGlassNonClientView::CalculateNonClientTopHeight() const { } void AeroGlassNonClientView::PaintDistributorLogo(ChromeCanvas* canvas) { - // The distributor logo is only painted when the frame is not maximized. - if (!frame_->IsMaximized() && !frame_->IsMinimized()) { + // The distributor logo is only painted when the frame is not maximized and + // when we actually have a logo. + if (!frame_->IsMaximized() && !frame_->IsMinimized() && + !distributor_logo_.empty()) { canvas->DrawBitmapInt(distributor_logo_, logo_bounds_.x(), logo_bounds_.y()); } @@ -319,6 +321,9 @@ void AeroGlassNonClientView::PaintClientEdge(ChromeCanvas* canvas) { } void AeroGlassNonClientView::LayoutDistributorLogo() { + if (distributor_logo_.empty()) + return; + int logo_w = distributor_logo_.width(); int logo_h = distributor_logo_.height(); @@ -342,7 +347,10 @@ void AeroGlassNonClientView::InitClass() { if (!initialized) { resources_ = new AeroGlassWindowResources; ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - distributor_logo_ = *rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO); + SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO); + if (!image->isNull()) + distributor_logo_ = *image; + 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 74ee8b1..116b9cb 100644 --- a/chrome/browser/views/frame/opaque_non_client_view.cc +++ b/chrome/browser/views/frame/opaque_non_client_view.cc @@ -812,8 +812,10 @@ void OpaqueNonClientView::PaintOTRAvatar(ChromeCanvas* canvas) { } void OpaqueNonClientView::PaintDistributorLogo(ChromeCanvas* canvas) { - // The distributor logo is only painted when the frame is not maximized. - if (!frame_->IsMaximized() && !frame_->IsMinimized()) { + // The distributor logo is only painted when the frame is not maximized and + // when we actually have a logo. + if (!frame_->IsMaximized() && !frame_->IsMinimized() && + !distributor_logo_.empty()) { canvas->DrawBitmapInt(distributor_logo_, logo_bounds_.x(), logo_bounds_.y()); } @@ -1007,6 +1009,9 @@ void OpaqueNonClientView::LayoutOTRAvatar() { } void OpaqueNonClientView::LayoutDistributorLogo() { + if (distributor_logo_.empty()) + return; + int logo_w = distributor_logo_.width(); int logo_h = distributor_logo_.height(); @@ -1063,7 +1068,9 @@ void OpaqueNonClientView::InitClass() { inactive_resources_ = new InactiveWindowResources; ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - distributor_logo_ = *rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT); + SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO_LIGHT); + if (!image->isNull()) + distributor_logo_ = *image; initialized = true; } |
