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

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

Issue 171413002: linux_aura: Keep GTK state from leaking between profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile. Created 6 years, 10 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
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 c84955e05df093bce9009e0ddfaeb90c43423462..7d31bdf30ef5a65d6588d798ff870bda929047dd 100644
--- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
+++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -50,7 +50,6 @@
//
// TODO(erg): There's still a lot that needs ported or done for the first time:
//
-// - Render and inject the button overlay from the gtk theme.
// - Render and inject the omnibox background.
// - Listen for the "style-set" signal on |fake_frame_| and recreate theme
// colors and images.
@@ -315,7 +314,7 @@ color_utils::HSL GetDefaultTint(int id) {
namespace libgtk2ui {
-Gtk2UI::Gtk2UI() : use_gtk_(false) {
+Gtk2UI::Gtk2UI() {
GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
}
@@ -366,7 +365,7 @@ gfx::Image Gtk2UI::GetThemeImageNamed(int id) const {
if (it != gtk_images_.end())
return it->second;
- if (/*use_gtk_ && */ IsOverridableImage(id)) {
+ if (IsOverridableImage(id)) {
gfx::Image image = gfx::Image(
gfx::ImageSkia::CreateFrom1xBitmap(GenerateGtkThemeBitmap(id)));
gtk_images_[id] = image;
@@ -443,19 +442,7 @@ double Gtk2UI::GetCursorBlinkInterval() const {
}
ui::NativeTheme* Gtk2UI::GetNativeTheme() const {
- return use_gtk_ ? NativeThemeGtk2::instance() :
- ui::NativeTheme::instance();
-}
-
-void Gtk2UI::SetUseSystemTheme(bool use_system_theme) {
- use_gtk_ = use_system_theme;
-
- FOR_EACH_OBSERVER(Gtk2Border, border_list_,
- InvalidateAndSetUsesGtk(use_system_theme));
-}
-
-bool Gtk2UI::GetUseSystemTheme() const {
- return use_gtk_;
+ return NativeThemeGtk2::instance();
}
bool Gtk2UI::GetDefaultUsesSystemTheme() const {
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.h ('k') | chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698