Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5757)

Unified Diff: chrome/browser/views/frame/opaque_browser_frame_view.cc

Issue 303012: Fix bubbles deactivating the opaque frame.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/window/non_client_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/opaque_browser_frame_view.cc
===================================================================
--- chrome/browser/views/frame/opaque_browser_frame_view.cc (revision 29537)
+++ chrome/browser/views/frame/opaque_browser_frame_view.cc (working copy)
@@ -584,7 +584,7 @@
// 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 @@
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 @@
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 @@
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 @@
// 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 @@
// 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);
« no previous file with comments | « no previous file | views/window/non_client_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698