Browse Source

libgtk2ui => libgtkui

Cheng Zhao 8 years ago
parent
commit
be29ea4dad

+ 2 - 2
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)

+ 1 - 1
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 {
 

+ 4 - 2
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<base::DictionaryValue> CreateFileSystemValue(
+    const FileSystem& file_system) {
+  std::unique_ptr<base::DictionaryValue> 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);

+ 1 - 1
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"

+ 4 - 4
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);
   }
 

+ 6 - 6
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);
   }
 

+ 5 - 5
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);
 }

+ 6 - 6
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);
 }

+ 1 - 1
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_

+ 1 - 1
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',

+ 1 - 1
vendor/brightray

@@ -1 +1 @@
-Subproject commit 51b4ff84b282d11d559a425253845f850bf3279b
+Subproject commit e7ef0ea4e7d45549128d6304c2faf732daedca2d