diff options
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/frame/browser_frame_view_chromeos.cc | 5 | ||||
-rw-r--r-- | chrome/browser/chromeos/frame/browser_view.cc | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/chrome/browser/chromeos/frame/browser_frame_view_chromeos.cc b/chrome/browser/chromeos/frame/browser_frame_view_chromeos.cc index be4f1b4..6af4457 100644 --- a/chrome/browser/chromeos/frame/browser_frame_view_chromeos.cc +++ b/chrome/browser/chromeos/frame/browser_frame_view_chromeos.cc @@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/frame/browser_frame_view_chromeos.h" +#include "chrome/browser/themes/theme_service_factory.h" +#include "chrome/browser/themes/theme_service.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -69,7 +71,8 @@ void BrowserFrameViewChromeos::ModifyMaximizedFramePainting( int* top_offset, SkBitmap** left_corner, SkBitmap** right_corner) { *top_offset = kThemeOffset; ui::ThemeProvider* tp = GetThemeProvider(); - if (tp->HasCustomImage(IDR_THEME_FRAME)) + if (!ThemeServiceFactory::GetForProfile( + browser_view()->browser()->profile())->UsingDefaultTheme()) return; if (browser_view()->IsOffTheRecord()) { *left_corner = tp->GetBitmapNamed(IDR_THEME_FRAME_INCOGNITO_LEFT); diff --git a/chrome/browser/chromeos/frame/browser_view.cc b/chrome/browser/chromeos/frame/browser_view.cc index 5c0ddc1..fa313ec 100644 --- a/chrome/browser/chromeos/frame/browser_view.cc +++ b/chrome/browser/chromeos/frame/browser_view.cc @@ -19,6 +19,8 @@ #include "chrome/browser/chromeos/status/status_area_view.h" #include "chrome/browser/chromeos/view_ids.h" #include "chrome/browser/chromeos/wm_ipc.h" +#include "chrome/browser/themes/theme_service_factory.h" +#include "chrome/browser/themes/theme_service.h" #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/browser/ui/views/frame/browser_frame_gtk.h" #include "chrome/browser/ui/views/frame/browser_view.h" @@ -573,10 +575,14 @@ StatusAreaHost::ScreenMode BrowserView::GetScreenMode() const { } StatusAreaHost::TextStyle BrowserView::GetTextStyle() const { - ui::ThemeProvider* tp = GetThemeProvider(); - return tp->HasCustomImage(IDR_THEME_FRAME) ? - StatusAreaHost::kWhiteHaloed : (IsOffTheRecord() ? - StatusAreaHost::kWhitePlain : StatusAreaHost::kGrayEmbossed); + ThemeService* theme_service = + ThemeServiceFactory::GetForProfile(GetProfile()); + + if (!theme_service->UsingDefaultTheme()) + return StatusAreaHost::kWhiteHaloed; + + return IsOffTheRecord() ? + StatusAreaHost::kWhitePlain : StatusAreaHost::kGrayEmbossed; } // BrowserView, MessageLoopForUI::Observer implementation. |