Fix up Chrome47 changes

This commit is contained in:
Paul Betts 2015-12-07 13:27:05 -08:00
parent d0be6c7411
commit af28900189
2 changed files with 7 additions and 5 deletions

View file

@ -22,7 +22,9 @@ gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info,
// Makes .* file extension matches all file types. // Makes .* file extension matches all file types.
if (*file_extension == ".*") if (*file_extension == ".*")
return true; return true;
return base::EndsWith(file_info->filename, *file_extension, false); return base::EndsWith(
file_info->filename,
*file_extension, base::CompareCase::INSENSITIVE_ASCII);
} }
// Deletes |data| when gtk_file_filter_add_custom() is done with it. // Deletes |data| when gtk_file_filter_add_custom() is done with it.

View file

@ -17,7 +17,6 @@
#if defined(OS_WIN) #if defined(OS_WIN)
#include "ui/gfx/color_utils.h" #include "ui/gfx/color_utils.h"
#elif defined(USE_X11) #elif defined(USE_X11)
#include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
#endif #endif
@ -33,15 +32,16 @@ const SkColor kDefaultColor = SkColorSetARGB(255, 233, 233, 233);
#if defined(USE_X11) #if defined(USE_X11)
void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight, void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight,
SkColor* hover, SkColor* background) { SkColor* hover, SkColor* background) {
libgtk2ui::OwnedWidgetGtk fake_menu_bar; GtkWidget* menu_bar = gtk_menu_bar_new();
fake_menu_bar.Own(gtk_menu_bar_new());
GtkStyle* style = gtk_rc_get_style(fake_menu_bar.get()); GtkStyle* style = gtk_rc_get_style(menu_bar);
*enabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]); *enabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
*disabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]); *disabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
*highlight = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]); *highlight = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
*hover = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]); *hover = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);
*background = libgtk2ui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]); *background = libgtk2ui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]);
gtk_widget_destroy(menu_bar);
} }
#endif #endif