diff options
author | chocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:19:36 +0000 |
---|---|---|
committer | chocobo@google.com <chocobo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 23:19:36 +0000 |
commit | 9b90411688764bb782a7451551d30226073b6bc0 (patch) | |
tree | b72f6725ae1f2b405f8e687b911f5da0924cd7b5 /chrome | |
parent | 90d982ed2e80b16dbdc409031faf7fc3d439949a (diff) | |
download | chromium_src-9b90411688764bb782a7451551d30226073b6bc0.zip chromium_src-9b90411688764bb782a7451551d30226073b6bc0.tar.gz chromium_src-9b90411688764bb782a7451551d30226073b6bc0.tar.bz2 |
Fix status area to use icognito mode background when in icognito mode.
BUG=24970
TEST=none
Review URL: http://codereview.chromium.org/274070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/compact_navigation_bar.cc | 14 | ||||
-rwxr-xr-x | chrome/browser/chromeos/status_area_view.cc | 14 |
2 files changed, 18 insertions, 10 deletions
diff --git a/chrome/browser/chromeos/compact_navigation_bar.cc b/chrome/browser/chromeos/compact_navigation_bar.cc index c944f12..d8859ee 100644 --- a/chrome/browser/chromeos/compact_navigation_bar.cc +++ b/chrome/browser/chromeos/compact_navigation_bar.cc @@ -127,11 +127,15 @@ void CompactNavigationBar::Paint(gfx::Canvas* canvas) { ThemeProvider* theme = browser_->profile()->GetThemeProvider(); // Fill the background. - SkBitmap* background; - if (browser_->window()->IsActive()) - background = theme->GetBitmapNamed(IDR_THEME_FRAME); - else - background = theme->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); + int image_name; + if (browser_->window()->IsActive()) { + image_name = browser_->profile()->IsOffTheRecord() ? + IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; + } else { + image_name = browser_->profile()->IsOffTheRecord() ? + IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE; + } + SkBitmap* background = theme->GetBitmapNamed(image_name); canvas->TileImageInt(*background, 0, 0, width(), height()); // Draw a white box around the edit field so that it looks larger. This is diff --git a/chrome/browser/chromeos/status_area_view.cc b/chrome/browser/chromeos/status_area_view.cc index d296d57..14ed8ac 100755 --- a/chrome/browser/chromeos/status_area_view.cc +++ b/chrome/browser/chromeos/status_area_view.cc @@ -182,11 +182,15 @@ void StatusAreaView::Paint(gfx::Canvas* canvas) { ThemeProvider* theme = browser_->profile()->GetThemeProvider(); // Fill the background. - SkBitmap* background; - if (browser_->window()->IsActive()) - background = theme->GetBitmapNamed(IDR_THEME_FRAME); - else - background = theme->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); + int image_name; + if (browser_->window()->IsActive()) { + image_name = browser_->profile()->IsOffTheRecord() ? + IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; + } else { + image_name = browser_->profile()->IsOffTheRecord() ? + IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE; + } + SkBitmap* background = theme->GetBitmapNamed(image_name); canvas->TileImageInt( *background, 0, kCustomFrameBackgroundVerticalOffset, |