libgtk2ui => libgtkui

This commit is contained in:
Cheng Zhao 2017-01-26 19:55:19 +09:00 committed by Kevin Sawicki
parent 820c0827c0
commit be29ea4dad
11 changed files with 32 additions and 30 deletions

View file

@ -24,7 +24,7 @@
#include "v8/include/v8-debug.h" #include "v8/include/v8-debug.h"
#if defined(USE_X11) #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" #include "ui/events/devices/x11/touch_factory_x11.h"
#endif #endif
@ -170,7 +170,7 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() {
bridge_task_runner_ = nullptr; bridge_task_runner_ = nullptr;
#if defined(USE_X11) #if defined(USE_X11)
libgtk2ui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); libgtkui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess());
#endif #endif
#if !defined(OS_MACOSX) #if !defined(OS_MACOSX)

View file

@ -10,7 +10,7 @@
#include "atom/browser/window_list.h" #include "atom/browser/window_list.h"
#include "atom/common/atom_version.h" #include "atom/common/atom_version.h"
#include "brightray/common/application_info.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 { namespace atom {

View file

@ -94,8 +94,10 @@ FileSystem CreateFileSystemStruct(
return FileSystem(file_system_name, root_url, file_system_path); return FileSystem(file_system_name, root_url, file_system_path);
} }
base::DictionaryValue* CreateFileSystemValue(const FileSystem& file_system) { std::unique_ptr<base::DictionaryValue> CreateFileSystemValue(
auto* file_system_value = new base::DictionaryValue(); 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("fileSystemName", file_system.file_system_name);
file_system_value->SetString("rootURL", file_system.root_url); file_system_value->SetString("rootURL", file_system.root_url);
file_system_value->SetString("fileSystemPath", file_system.file_system_path); file_system_value->SetString("fileSystemPath", file_system.file_system_path);

View file

@ -41,7 +41,7 @@
#include "atom/browser/ui/x/window_state_watcher.h" #include "atom/browser/ui/x/window_state_watcher.h"
#include "atom/browser/ui/x/x_window_utils.h" #include "atom/browser/ui/x/x_window_utils.h"
#include "base/strings/string_util.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/base/x/x11_util.h"
#include "ui/gfx/x/x11_types.h" #include "ui/gfx/x/x11_types.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"

View file

@ -9,8 +9,8 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" #include "chrome/browser/ui/libgtkui/gtk_signal.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h" #include "chrome/browser/ui/libgtkui/gtk_util.h"
#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
namespace file_dialog { namespace file_dialog {
@ -61,7 +61,7 @@ class FileChooserDialog {
NULL); NULL);
if (parent_) { if (parent_) {
parent_->SetEnabled(false); parent_->SetEnabled(false);
libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE); 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 // We need to call gtk_window_present after making the widgets visible to
// make sure window gets correctly raised and gets focus. // 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); gtk_window_present_with_time(GTK_WINDOW(dialog_), time);
} }

View file

@ -11,9 +11,9 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" #include "chrome/browser/ui/libgtkui/gtk_signal.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h" #include "chrome/browser/ui/libgtkui/gtk_util.h"
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" #include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
#include "ui/views/widget/desktop_aura/x11_desktop_handler.h" #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
#define ANSI_FOREGROUND_RED "\x1b[31m" #define ANSI_FOREGROUND_RED "\x1b[31m"
@ -54,7 +54,7 @@ class GtkMessageBox : public NativeWindowObserver {
// Set dialog's icon. // Set dialog's icon.
if (!icon.isNull()) { if (!icon.isNull()) {
GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(*icon.bitmap()); GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(*icon.bitmap());
GtkIconSource* iconsource = gtk_icon_source_new(); GtkIconSource* iconsource = gtk_icon_source_new();
GtkIconSet* iconset = gtk_icon_set_new(); GtkIconSet* iconset = gtk_icon_set_new();
gtk_icon_source_set_pixbuf(iconsource, pixbuf); gtk_icon_source_set_pixbuf(iconsource, pixbuf);
@ -80,7 +80,7 @@ class GtkMessageBox : public NativeWindowObserver {
if (parent_) { if (parent_) {
parent_->AddObserver(this); parent_->AddObserver(this);
parent_->SetEnabled(false); parent_->SetEnabled(false);
libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE); gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
} }
} }
@ -126,7 +126,7 @@ class GtkMessageBox : public NativeWindowObserver {
gtk_widget_show_all(dialog_); gtk_widget_show_all(dialog_);
// We need to call gtk_window_present after making the widgets visible to // We need to call gtk_window_present after making the widgets visible to
// make sure window gets correctly raised and gets focus. // 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); gtk_window_present_with_time(GTK_WINDOW(dialog_), time);
} }

View file

@ -7,8 +7,8 @@
#include "atom/browser/browser.h" #include "atom/browser/browser.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" #include "chrome/browser/ui/libgtkui/app_indicator_icon.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_status_icon.h" #include "chrome/browser/ui/libgtkui/gtk_status_icon.h"
#include "ui/gfx/image/image.h" #include "ui/gfx/image/image.h"
namespace atom { namespace atom {
@ -33,15 +33,15 @@ void TrayIconGtk::SetImage(const gfx::Image& image) {
} }
base::string16 empty; base::string16 empty;
if (libgtk2ui::AppIndicatorIcon::CouldOpen()) { if (libgtkui::AppIndicatorIcon::CouldOpen()) {
++indicators_count; ++indicators_count;
icon_.reset(new libgtk2ui::AppIndicatorIcon( icon_.reset(new libgtkui::AppIndicatorIcon(
base::StringPrintf( base::StringPrintf(
"%s%d", Browser::Get()->GetName().c_str(), indicators_count), "%s%d", Browser::Get()->GetName().c_str(), indicators_count),
image.AsImageSkia(), image.AsImageSkia(),
empty)); empty));
} else { } else {
icon_.reset(new libgtk2ui::Gtk2StatusIcon(image.AsImageSkia(), empty)); icon_.reset(new libgtkui::Gtk2StatusIcon(image.AsImageSkia(), empty));
} }
icon_->set_delegate(this); icon_->set_delegate(this);
} }

View file

@ -17,7 +17,7 @@
#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/skia_utils_gtk2.h" #include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
#endif #endif
namespace atom { namespace atom {
@ -35,11 +35,11 @@ void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight,
GtkWidget* menu_bar = gtk_menu_bar_new(); GtkWidget* menu_bar = gtk_menu_bar_new();
GtkStyle* style = gtk_rc_get_style(menu_bar); GtkStyle* style = gtk_rc_get_style(menu_bar);
*enabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]); *enabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
*disabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]); *disabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
*highlight = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]); *highlight = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
*hover = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]); *hover = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);
*background = libgtk2ui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]); *background = libgtkui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]);
gtk_widget_destroy(menu_bar); gtk_widget_destroy(menu_bar);
} }

View file

@ -8,7 +8,7 @@
#ifndef ATOM_COMMON_CHROME_VERSION_H_ #ifndef ATOM_COMMON_CHROME_VERSION_H_
#define 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 #define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_ #endif // ATOM_COMMON_CHROME_VERSION_H_

View file

@ -9,7 +9,7 @@ import sys
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent' 'https://s3.amazonaws.com/github-janky-artifacts/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \ LIBCHROMIUMCONTENT_COMMIT = os.getenv('LIBCHROMIUMCONTENT_COMMIT') or \
'b71afafe59998daf0cb275b50140378b8c88b101' '0360b49dc59dcaad80bc056c9c9678273d4200e6'
PLATFORM = { PLATFORM = {
'cygwin': 'win32', 'cygwin': 'win32',

2
vendor/brightray vendored

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