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

Unified Diff: chrome/browser/gtk/gtk_theme_provider.cc

Issue 272033: Misc. cleanup for theme provider code, including:... (Closed) Base URL: svn://chrome-svn/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 | « chrome/browser/gtk/gtk_theme_provider.h ('k') | chrome/browser/gtk/gtk_theme_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/gtk_theme_provider.cc
===================================================================
--- chrome/browser/gtk/gtk_theme_provider.cc (revision 28595)
+++ chrome/browser/gtk/gtk_theme_provider.cc (working copy)
@@ -127,12 +127,9 @@
void GtkThemeProvider::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::PREF_CHANGED) {
- std::wstring key = *Details<std::wstring>(details).ptr();
- if (key == prefs::kUsesSystemTheme) {
- use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
- }
- }
+ if ((type == NotificationType::PREF_CHANGED) &&
+ (*Details<std::wstring>(details).ptr() == prefs::kUsesSystemTheme))
+ use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
}
GtkWidget* GtkThemeProvider::BuildChromeButton() {
@@ -268,10 +265,10 @@
bitmap->allocPixels();
bitmap->eraseRGB(color->red >> 8, color->green >> 8, color->blue >> 8);
return bitmap;
- } else if ((id == IDR_THEME_TAB_BACKGROUND ||
- id == IDR_THEME_TAB_BACKGROUND_INCOGNITO)) {
- return GenerateTabBackgroundBitmapImpl(id);
}
+ if ((id == IDR_THEME_TAB_BACKGROUND) ||
+ (id == IDR_THEME_TAB_BACKGROUND_INCOGNITO))
+ return GenerateTabBackgroundBitmapImpl(id);
}
return BrowserThemeProvider::LoadThemeBitmap(id);
« no previous file with comments | « chrome/browser/gtk/gtk_theme_provider.h ('k') | chrome/browser/gtk/gtk_theme_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698