summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 21:04:33 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 21:04:33 +0000
commitf8d19e8bfe27bfd47a0d22878d6ab98b08f6275f (patch)
tree74b6fe840d81fef1435696f2450b9aa5bc9478ab /chrome/browser/views
parent91b2805a31195aedebb910fa12f886a45fd55bcb (diff)
downloadchromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.zip
chromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.tar.gz
chromium_src-f8d19e8bfe27bfd47a0d22878d6ab98b08f6275f.tar.bz2
Fix bubbles deactivating the opaque frame.
The theme work caused a check that had been included to see if the frame view should be painted as active even if it was inactive. This reintroduces that check. http://crbug.com/20966 TEST=see bug Review URL: http://codereview.chromium.org/303012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/frame/opaque_browser_frame_view.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc
index eb936ea..6a23de1 100644
--- a/chrome/browser/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc
@@ -584,7 +584,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
// Never theme app and popup windows.
if (!browser_view_->IsBrowserTypeNormal()) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- if (frame_->GetWindow()->IsActive()) {
+ if (ShouldPaintAsActive()) {
theme_frame = rb.GetBitmapNamed(IDR_FRAME);
frame_color = browser_view_->IsOffTheRecord() ?
ResourceBundle::frame_color_incognito :
@@ -596,7 +596,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
ResourceBundle::frame_color_inactive;
}
} else if (!browser_view_->IsOffTheRecord()) {
- if (frame_->GetWindow()->IsActive()) {
+ if (ShouldPaintAsActive()) {
theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME);
frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME);
} else {
@@ -604,7 +604,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME_INACTIVE);
}
} else {
- if (frame_->GetWindow()->IsActive()) {
+ if (ShouldPaintAsActive()) {
theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO);
frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME_INCOGNITO);
} else {
@@ -637,7 +637,7 @@ void OpaqueBrowserFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
browser_view_->IsBrowserTypeNormal()) {
SkBitmap* theme_overlay;
- if (frame_->GetWindow()->IsActive())
+ if (ShouldPaintAsActive())
theme_overlay = tp->GetBitmapNamed(IDR_THEME_FRAME_OVERLAY);
else
theme_overlay = tp->GetBitmapNamed(IDR_THEME_FRAME_OVERLAY_INACTIVE);
@@ -694,16 +694,16 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
// Never theme app and popup windows.
if (!browser_view_->IsBrowserTypeNormal()) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- if (frame_->GetWindow()->IsActive())
+ if (ShouldPaintAsActive())
theme_frame = rb.GetBitmapNamed(IDR_FRAME);
else
theme_frame = rb.GetBitmapNamed(IDR_THEME_FRAME_INACTIVE);
} else if (!browser_view_->IsOffTheRecord()) {
- theme_frame = window->IsActive() ?
+ theme_frame = ShouldPaintAsActive() ?
tp->GetBitmapNamed(IDR_THEME_FRAME) :
tp->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE);
} else {
- theme_frame = window->IsActive() ?
+ theme_frame = ShouldPaintAsActive() ?
tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO) :
tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO_INACTIVE);
}
@@ -714,7 +714,7 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
// Draw the theme frame overlay
if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
browser_view_->IsBrowserTypeNormal()) {
- SkBitmap* theme_overlay = frame_->GetWindow()->IsActive() ?
+ SkBitmap* theme_overlay = ShouldPaintAsActive() ?
tp->GetBitmapNamed(IDR_THEME_FRAME_OVERLAY) :
tp->GetBitmapNamed(IDR_THEME_FRAME_OVERLAY_INACTIVE);
canvas->DrawBitmapInt(*theme_overlay, 0, 0);