OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_provider.h" | 5 #include "chrome/browser/ui/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 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 NotificationService::NoDetails()); | 329 NotificationService::NoDetails()); |
330 } | 330 } |
331 | 331 |
332 void GtkThemeProvider::SetTheme(const Extension* extension) { | 332 void GtkThemeProvider::SetTheme(const Extension* extension) { |
333 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false); | 333 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false); |
334 LoadDefaultValues(); | 334 LoadDefaultValues(); |
335 BrowserThemeProvider::SetTheme(extension); | 335 BrowserThemeProvider::SetTheme(extension); |
336 } | 336 } |
337 | 337 |
338 void GtkThemeProvider::UseDefaultTheme() { | 338 void GtkThemeProvider::UseDefaultTheme() { |
| 339 FilePath profile_basename = profile()->GetPath().BaseName(); |
| 340 LOG(INFO) << profile_basename.value() << " Gtk::UseDefaultTheme"; |
| 341 |
339 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false); | 342 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, false); |
340 LoadDefaultValues(); | 343 LoadDefaultValues(); |
341 BrowserThemeProvider::UseDefaultTheme(); | 344 BrowserThemeProvider::UseDefaultTheme(); |
342 } | 345 } |
343 | 346 |
344 void GtkThemeProvider::SetNativeTheme() { | 347 void GtkThemeProvider::SetNativeTheme() { |
| 348 FilePath profile_basename = profile()->GetPath().BaseName(); |
| 349 LOG(INFO) << profile_basename.value() << " Gtk::SetNativeTheme"; |
| 350 |
345 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, true); | 351 profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, true); |
346 ClearAllThemeData(); | 352 ClearAllThemeData(); |
347 LoadGtkValues(); | 353 LoadGtkValues(); |
348 NotifyThemeChanged(NULL); | 354 NotifyThemeChanged(NULL); |
349 } | 355 } |
350 | 356 |
351 bool GtkThemeProvider::UsingDefaultTheme() { | 357 bool GtkThemeProvider::UsingDefaultTheme() { |
352 return !use_gtk_ && BrowserThemeProvider::UsingDefaultTheme(); | 358 return !use_gtk_ && BrowserThemeProvider::UsingDefaultTheme(); |
353 } | 359 } |
354 | 360 |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 cairo_set_line_width(cr, 1.0); | 1130 cairo_set_line_width(cr, 1.0); |
1125 cairo_move_to(cr, start_x, widget->allocation.y); | 1131 cairo_move_to(cr, start_x, widget->allocation.y); |
1126 cairo_line_to(cr, start_x, | 1132 cairo_line_to(cr, start_x, |
1127 widget->allocation.y + widget->allocation.height); | 1133 widget->allocation.y + widget->allocation.height); |
1128 cairo_stroke(cr); | 1134 cairo_stroke(cr); |
1129 cairo_destroy(cr); | 1135 cairo_destroy(cr); |
1130 cairo_pattern_destroy(pattern); | 1136 cairo_pattern_destroy(pattern); |
1131 | 1137 |
1132 return TRUE; | 1138 return TRUE; |
1133 } | 1139 } |
OLD | NEW |