From be29ea4dada68db1b4f29cf41bfa9ad18c41a3ed Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 26 Jan 2017 19:55:19 +0900 Subject: [PATCH] libgtk2ui => libgtkui --- atom/browser/atom_browser_main_parts.cc | 4 ++-- atom/browser/browser_linux.cc | 2 +- atom/browser/common_web_contents_delegate.cc | 6 ++++-- atom/browser/native_window_views.cc | 2 +- atom/browser/ui/file_dialog_gtk.cc | 8 ++++---- atom/browser/ui/message_box_gtk.cc | 12 ++++++------ atom/browser/ui/tray_icon_gtk.cc | 10 +++++----- atom/browser/ui/views/menu_bar.cc | 12 ++++++------ atom/common/chrome_version.h | 2 +- script/lib/config.py | 2 +- vendor/brightray | 2 +- 11 files changed, 32 insertions(+), 30 deletions(-) diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index 1507a97..e386e67 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -24,7 +24,7 @@ #include "v8/include/v8-debug.h" #if defined(USE_X11) -#include "chrome/browser/ui/libgtk2ui/gtk2_util.h" +#include "chrome/browser/ui/libgtkui/gtk_util.h" #include "ui/events/devices/x11/touch_factory_x11.h" #endif @@ -170,7 +170,7 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { bridge_task_runner_ = nullptr; #if defined(USE_X11) - libgtk2ui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); + libgtkui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); #endif #if !defined(OS_MACOSX) diff --git a/atom/browser/browser_linux.cc b/atom/browser/browser_linux.cc index 1adf992..6abfcf5 100644 --- a/atom/browser/browser_linux.cc +++ b/atom/browser/browser_linux.cc @@ -10,7 +10,7 @@ #include "atom/browser/window_list.h" #include "atom/common/atom_version.h" #include "brightray/common/application_info.h" -#include "chrome/browser/ui/libgtk2ui/unity_service.h" +#include "chrome/browser/ui/libgtkui/unity_service.h" namespace atom { diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index ac1f9d4..ed0fd5e 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -94,8 +94,10 @@ FileSystem CreateFileSystemStruct( return FileSystem(file_system_name, root_url, file_system_path); } -base::DictionaryValue* CreateFileSystemValue(const FileSystem& file_system) { - auto* file_system_value = new base::DictionaryValue(); +std::unique_ptr CreateFileSystemValue( + const FileSystem& file_system) { + std::unique_ptr file_system_value( + new base::DictionaryValue()); file_system_value->SetString("fileSystemName", file_system.file_system_name); file_system_value->SetString("rootURL", file_system.root_url); file_system_value->SetString("fileSystemPath", file_system.file_system_path); diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 16a10b3..3270add 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -41,7 +41,7 @@ #include "atom/browser/ui/x/window_state_watcher.h" #include "atom/browser/ui/x/x_window_utils.h" #include "base/strings/string_util.h" -#include "chrome/browser/ui/libgtk2ui/unity_service.h" +#include "chrome/browser/ui/libgtkui/unity_service.h" #include "ui/base/x/x11_util.h" #include "ui/gfx/x/x11_types.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" diff --git a/atom/browser/ui/file_dialog_gtk.cc b/atom/browser/ui/file_dialog_gtk.cc index b6233d2..18f53eba 100644 --- a/atom/browser/ui/file_dialog_gtk.cc +++ b/atom/browser/ui/file_dialog_gtk.cc @@ -9,8 +9,8 @@ #include "base/callback.h" #include "base/files/file_util.h" #include "base/strings/string_util.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_util.h" +#include "chrome/browser/ui/libgtkui/gtk_signal.h" +#include "chrome/browser/ui/libgtkui/gtk_util.h" #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" namespace file_dialog { @@ -61,7 +61,7 @@ class FileChooserDialog { NULL); if (parent_) { parent_->SetEnabled(false); - libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); + libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE); } @@ -109,7 +109,7 @@ class FileChooserDialog { // We need to call gtk_window_present after making the widgets visible to // make sure window gets correctly raised and gets focus. - int time = views::X11DesktopHandler::get()->wm_user_time_ms(); + int time = ui::X11EventSource::GetInstance()->GetTimestamp(); gtk_window_present_with_time(GTK_WINDOW(dialog_), time); } diff --git a/atom/browser/ui/message_box_gtk.cc b/atom/browser/ui/message_box_gtk.cc index f0ebc70..0717d4d 100644 --- a/atom/browser/ui/message_box_gtk.cc +++ b/atom/browser/ui/message_box_gtk.cc @@ -11,9 +11,9 @@ #include "base/callback.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_util.h" -#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" +#include "chrome/browser/ui/libgtkui/gtk_signal.h" +#include "chrome/browser/ui/libgtkui/gtk_util.h" +#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" #define ANSI_FOREGROUND_RED "\x1b[31m" @@ -54,7 +54,7 @@ class GtkMessageBox : public NativeWindowObserver { // Set dialog's icon. if (!icon.isNull()) { - GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(*icon.bitmap()); + GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(*icon.bitmap()); GtkIconSource* iconsource = gtk_icon_source_new(); GtkIconSet* iconset = gtk_icon_set_new(); gtk_icon_source_set_pixbuf(iconsource, pixbuf); @@ -80,7 +80,7 @@ class GtkMessageBox : public NativeWindowObserver { if (parent_) { parent_->AddObserver(this); parent_->SetEnabled(false); - libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); + libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE); } } @@ -126,7 +126,7 @@ class GtkMessageBox : public NativeWindowObserver { gtk_widget_show_all(dialog_); // We need to call gtk_window_present after making the widgets visible to // make sure window gets correctly raised and gets focus. - int time = views::X11DesktopHandler::get()->wm_user_time_ms(); + int time = ui::X11EventSource::GetInstance()->GetTimestamp(); gtk_window_present_with_time(GTK_WINDOW(dialog_), time); } diff --git a/atom/browser/ui/tray_icon_gtk.cc b/atom/browser/ui/tray_icon_gtk.cc index 3286a95..e1836ad 100644 --- a/atom/browser/ui/tray_icon_gtk.cc +++ b/atom/browser/ui/tray_icon_gtk.cc @@ -7,8 +7,8 @@ #include "atom/browser/browser.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" -#include "chrome/browser/ui/libgtk2ui/gtk2_status_icon.h" +#include "chrome/browser/ui/libgtkui/app_indicator_icon.h" +#include "chrome/browser/ui/libgtkui/gtk_status_icon.h" #include "ui/gfx/image/image.h" namespace atom { @@ -33,15 +33,15 @@ void TrayIconGtk::SetImage(const gfx::Image& image) { } base::string16 empty; - if (libgtk2ui::AppIndicatorIcon::CouldOpen()) { + if (libgtkui::AppIndicatorIcon::CouldOpen()) { ++indicators_count; - icon_.reset(new libgtk2ui::AppIndicatorIcon( + icon_.reset(new libgtkui::AppIndicatorIcon( base::StringPrintf( "%s%d", Browser::Get()->GetName().c_str(), indicators_count), image.AsImageSkia(), empty)); } else { - icon_.reset(new libgtk2ui::Gtk2StatusIcon(image.AsImageSkia(), empty)); + icon_.reset(new libgtkui::Gtk2StatusIcon(image.AsImageSkia(), empty)); } icon_->set_delegate(this); } diff --git a/atom/browser/ui/views/menu_bar.cc b/atom/browser/ui/views/menu_bar.cc index f01edaa..5d9b715 100644 --- a/atom/browser/ui/views/menu_bar.cc +++ b/atom/browser/ui/views/menu_bar.cc @@ -17,7 +17,7 @@ #if defined(OS_WIN) #include "ui/gfx/color_utils.h" #elif defined(USE_X11) -#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" +#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" #endif namespace atom { @@ -35,11 +35,11 @@ void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight, GtkWidget* menu_bar = gtk_menu_bar_new(); 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]); + *enabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]); + *disabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]); + *highlight = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]); + *hover = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]); + *background = libgtkui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]); gtk_widget_destroy(menu_bar); } diff --git a/atom/common/chrome_version.h b/atom/common/chrome_version.h index 2a2a067..782973f 100644 --- a/atom/common/chrome_version.h +++ b/atom/common/chrome_version.h @@ -8,7 +8,7 @@ #ifndef ATOM_COMMON_CHROME_VERSION_H_ #define ATOM_COMMON_CHROME_VERSION_H_ -#define CHROME_VERSION_STRING "56.0.2924.59" +#define CHROME_VERSION_STRING "56.0.2924.67" #define CHROME_VERSION "v" CHROME_VERSION_STRING #endif // ATOM_COMMON_CHROME_VERSION_H_ diff --git a/script/lib/config.py b/script/lib/config.py index 6cfffc7..68536a7 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -9,7 +9,7 @@ import sys BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \ - 'b71afafe59998daf0cb275b50140378b8c88b101' + '0360b49dc59dcaad80bc056c9c9678273d4200e6' PLATFORM = { 'cygwin': 'win32', diff --git a/vendor/brightray b/vendor/brightray index 51b4ff8..e7ef0ea 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 51b4ff84b282d11d559a425253845f850bf3279b +Subproject commit e7ef0ea4e7d45549128d6304c2faf732daedca2d -- 2.7.4