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

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

Issue 19471005: Add custom default theme support and create a managed user default theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't call NotifyThemeChanged if not ready. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_
6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ 6 #define CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 virtual void Init(Profile* profile) OVERRIDE; 72 virtual void Init(Profile* profile) OVERRIDE;
73 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE; 73 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const OVERRIDE;
74 virtual gfx::Image GetImageNamed(int id) const OVERRIDE; 74 virtual gfx::Image GetImageNamed(int id) const OVERRIDE;
75 virtual SkColor GetColor(int id) const OVERRIDE; 75 virtual SkColor GetColor(int id) const OVERRIDE;
76 virtual bool HasCustomImage(int id) const OVERRIDE; 76 virtual bool HasCustomImage(int id) const OVERRIDE;
77 virtual void SetTheme(const extensions::Extension* extension) OVERRIDE; 77 virtual void SetTheme(const extensions::Extension* extension) OVERRIDE;
78 virtual void UseDefaultTheme() OVERRIDE; 78 virtual void UseDefaultTheme() OVERRIDE;
79 virtual void SetNativeTheme() OVERRIDE; 79 virtual void SetNativeTheme() OVERRIDE;
80 virtual bool UsingDefaultTheme() const OVERRIDE; 80 virtual bool UsingDefaultTheme() const OVERRIDE;
81 virtual bool UsingNativeTheme() const OVERRIDE; 81 virtual bool UsingNativeTheme() const OVERRIDE;
82 virtual bool ShouldInitWithNativeTheme() const OVERRIDE;
82 83
83 // Creates a GtkChromeButton instance, registered with this theme provider, 84 // Creates a GtkChromeButton instance, registered with this theme provider,
84 // with a "destroy" signal to remove it from our internal list when it goes 85 // with a "destroy" signal to remove it from our internal list when it goes
85 // away. 86 // away.
86 GtkWidget* BuildChromeButton(); 87 GtkWidget* BuildChromeButton();
87 88
88 // Creates a GtkChromeLinkButton instance. We update its state as theme 89 // Creates a GtkChromeLinkButton instance. We update its state as theme
89 // changes, and listen for its destruction. 90 // changes, and listen for its destruction.
90 GtkWidget* BuildChromeLinkButton(const std::string& text); 91 GtkWidget* BuildChromeLinkButton(const std::string& text);
91 92
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 310
310 // The default folder icon and default bookmark icon for the GTK theme. 311 // The default folder icon and default bookmark icon for the GTK theme.
311 // These are static because the system can only have one theme at a time. 312 // These are static because the system can only have one theme at a time.
312 // They are cached when they are requested the first time, and cleared when 313 // They are cached when they are requested the first time, and cleared when
313 // the system theme changes. 314 // the system theme changes.
314 static base::LazyInstance<gfx::Image> default_folder_icon_; 315 static base::LazyInstance<gfx::Image> default_folder_icon_;
315 static base::LazyInstance<gfx::Image> default_bookmark_icon_; 316 static base::LazyInstance<gfx::Image> default_bookmark_icon_;
316 }; 317 };
317 318
318 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_ 319 #endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_unittest.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698