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

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 11445038: Revert changes to have ExtensionService notify ThemeService directly for themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 5 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return ThemeService::GetColor(id); 329 return ThemeService::GetColor(id);
330 } 330 }
331 331
332 bool GtkThemeService::HasCustomImage(int id) const { 332 bool GtkThemeService::HasCustomImage(int id) const {
333 if (use_gtk_) 333 if (use_gtk_)
334 return IsOverridableImage(id); 334 return IsOverridableImage(id);
335 335
336 return ThemeService::HasCustomImage(id); 336 return ThemeService::HasCustomImage(id);
337 } 337 }
338 338
339 void GtkThemeService::InitThemesFor(content::NotificationObserver* observer) { 339 void GtkThemeService::InitThemesFor(NotificationObserver* observer) {
340 observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 340 observer->Observe(chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
341 content::Source<ThemeService>(this), 341 content::Source<ThemeService>(this),
342 content::NotificationService::NoDetails()); 342 content::NotificationService::NoDetails());
343 } 343 }
344 344
345 void GtkThemeService::SetTheme(const extensions::Extension* extension) { 345 void GtkThemeService::SetTheme(const extensions::Extension* extension) {
346 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false); 346 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false);
347 LoadDefaultValues(); 347 LoadDefaultValues();
348 ThemeService::SetTheme(extension); 348 ThemeService::SetTheme(extension);
349 } 349 }
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 cairo_stroke(cr); 1143 cairo_stroke(cr);
1144 cairo_destroy(cr); 1144 cairo_destroy(cr);
1145 cairo_pattern_destroy(pattern); 1145 cairo_pattern_destroy(pattern);
1146 1146
1147 return TRUE; 1147 return TRUE;
1148 } 1148 }
1149 1149
1150 void GtkThemeService::OnUsesSystemThemeChanged() { 1150 void GtkThemeService::OnUsesSystemThemeChanged() {
1151 use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); 1151 use_gtk_ = profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme);
1152 } 1152 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698