Merge pull request #3718 from atom/chrome47-linux

Port Chrome47 on Linux
This commit is contained in:
Cheng Zhao 2015-12-08 10:14:27 +08:00
commit e8b5a6dedf
5 changed files with 48 additions and 36 deletions

View file

@ -22,7 +22,9 @@ gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info,
// Makes .* file extension matches all file types.
if (*file_extension == ".*")
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.

View file

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