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

Side by Side Diff: chrome/browser/gtk/gtk_theme_provider.cc

Issue 3052034: base: Rename EnvVarGetter to Environment. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: review Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/gtk_theme_provider.h" 5 #include "chrome/browser/gtk/gtk_theme_provider.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "app/gtk_signal_registrar.h" 11 #include "app/gtk_signal_registrar.h"
12 #include "app/resource_bundle.h" 12 #include "app/resource_bundle.h"
13 #include "base/env_var.h" 13 #include "base/environment.h"
14 #include "base/stl_util-inl.h" 14 #include "base/stl_util-inl.h"
15 #include "base/xdg_util.h" 15 #include "base/xdg_util.h"
16 #include "chrome/browser/metrics/user_metrics.h" 16 #include "chrome/browser/metrics/user_metrics.h"
17 #include "chrome/browser/profile.h" 17 #include "chrome/browser/profile.h"
18 #include "chrome/browser/gtk/cairo_cached_surface.h" 18 #include "chrome/browser/gtk/cairo_cached_surface.h"
19 #include "chrome/browser/gtk/hover_controller_gtk.h" 19 #include "chrome/browser/gtk/hover_controller_gtk.h"
20 #include "chrome/browser/gtk/gtk_chrome_button.h" 20 #include "chrome/browser/gtk/gtk_chrome_button.h"
21 #include "chrome/browser/gtk/meta_frames.h" 21 #include "chrome/browser/gtk/meta_frames.h"
22 #include "chrome/browser/pref_service.h" 22 #include "chrome/browser/pref_service.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 556 }
557 557
558 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 558 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
559 static GdkPixbuf* default_bookmark_icon_ = rb.GetPixbufNamed( 559 static GdkPixbuf* default_bookmark_icon_ = rb.GetPixbufNamed(
560 IDR_DEFAULT_FAVICON); 560 IDR_DEFAULT_FAVICON);
561 return default_bookmark_icon_; 561 return default_bookmark_icon_;
562 } 562 }
563 563
564 // static 564 // static
565 bool GtkThemeProvider::DefaultUsesSystemTheme() { 565 bool GtkThemeProvider::DefaultUsesSystemTheme() {
566 scoped_ptr<base::EnvVarGetter> env_getter(base::EnvVarGetter::Create()); 566 scoped_ptr<base::Environment> env(base::Environment::Create());
567 567
568 switch (base::GetDesktopEnvironment(env_getter.get())) { 568 switch (base::GetDesktopEnvironment(env.get())) {
569 case base::DESKTOP_ENVIRONMENT_GNOME: 569 case base::DESKTOP_ENVIRONMENT_GNOME:
570 case base::DESKTOP_ENVIRONMENT_XFCE: 570 case base::DESKTOP_ENVIRONMENT_XFCE:
571 return true; 571 return true;
572 default: 572 default:
573 return false; 573 return false;
574 } 574 }
575 } 575 }
576 576
577 void GtkThemeProvider::ClearAllThemeData() { 577 void GtkThemeProvider::ClearAllThemeData() {
578 colors_.clear(); 578 colors_.clear();
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 cairo_set_line_width(cr, 1.0); 1040 cairo_set_line_width(cr, 1.0);
1041 cairo_move_to(cr, start_x, widget->allocation.y); 1041 cairo_move_to(cr, start_x, widget->allocation.y);
1042 cairo_line_to(cr, start_x, 1042 cairo_line_to(cr, start_x,
1043 widget->allocation.y + widget->allocation.height); 1043 widget->allocation.y + widget->allocation.height);
1044 cairo_stroke(cr); 1044 cairo_stroke(cr);
1045 cairo_destroy(cr); 1045 cairo_destroy(cr);
1046 cairo_pattern_destroy(pattern); 1046 cairo_pattern_destroy(pattern);
1047 1047
1048 return TRUE; 1048 return TRUE;
1049 } 1049 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698