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

Unified Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 17494005: linux_aura: Three fixes for switching themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to tot Created 7 years, 6 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/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
index 195460aba4b4491a88cef62987e978df37edb18e..3243d7b54afec82bbfbbb0d8d6f93d5672e31a87 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -7,6 +7,7 @@
#include <set>
#include "base/command_line.h"
+#include "base/environment.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/nix/mime_util_xdg.h"
@@ -342,10 +343,32 @@ bool Gtk2UI::GetColor(int id, SkColor* color) const {
return false;
}
+bool Gtk2UI::HasCustomImage(int id) const {
+ return IsOverridableImage(id);
+}
+
ui::NativeTheme* Gtk2UI::GetNativeTheme() const {
return NativeThemeGtk2::instance();
}
+bool Gtk2UI::GetDefaultUsesSystemTheme() const {
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+
+ switch (base::nix::GetDesktopEnvironment(env.get())) {
+ case base::nix::DESKTOP_ENVIRONMENT_GNOME:
+ case base::nix::DESKTOP_ENVIRONMENT_UNITY:
+ case base::nix::DESKTOP_ENVIRONMENT_XFCE:
+ return true;
+ case base::nix::DESKTOP_ENVIRONMENT_KDE3:
+ case base::nix::DESKTOP_ENVIRONMENT_KDE4:
+ case base::nix::DESKTOP_ENVIRONMENT_OTHER:
+ return false;
+ }
+ // Unless GetDesktopEnvironment() badly misbehaves, this should never happen.
+ NOTREACHED();
+ return false;
+}
+
ui::SelectFileDialog* Gtk2UI::CreateSelectFileDialog(
ui::SelectFileDialog::Listener* listener,
ui::SelectFilePolicy* policy) const {
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698