chore: bump chromium to 119.0.6045.0 (main) (#40076)
* chore: bump chromium in DEPS to 119.0.6045.0 * chore: update patches * 4864948: Remove legacy-legacy4864948
* 4907760: Remove ui/base/glib/glib_signal.h4907760
--------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
83a928f6e3
commit
8f7a48879e
34 changed files with 472 additions and 173 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <map>
|
||||
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/raw_ptr_exclusion.h"
|
||||
|
@ -18,7 +19,7 @@
|
|||
#include "shell/browser/native_window_observer.h"
|
||||
#include "shell/browser/native_window_views.h"
|
||||
#include "shell/browser/ui/gtk_util.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/base/glib/scoped_gsignal.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
#include "ui/gtk/gtk_ui.h" // nogncheck
|
||||
#include "ui/gtk/gtk_util.h" // nogncheck
|
||||
|
@ -89,8 +90,10 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog_));
|
||||
GtkWidget* check_button =
|
||||
gtk_check_button_new_with_label(settings.checkbox_label.c_str());
|
||||
g_signal_connect(check_button, "toggled",
|
||||
G_CALLBACK(OnCheckboxToggledThunk), this);
|
||||
signals_.emplace_back(
|
||||
check_button, "toggled",
|
||||
base::BindRepeating(&GtkMessageBox::OnCheckboxToggled,
|
||||
base::Unretained(this)));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
|
||||
settings.checkbox_checked);
|
||||
gtk_container_add(GTK_CONTAINER(message_area), check_button);
|
||||
|
@ -172,10 +175,11 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
void RunAsynchronous(MessageBoxCallback callback) {
|
||||
callback_ = std::move(callback);
|
||||
|
||||
g_signal_connect(dialog_, "delete-event",
|
||||
G_CALLBACK(gtk_widget_hide_on_delete), nullptr);
|
||||
g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseDialogThunk),
|
||||
this);
|
||||
signals_.emplace_back(dialog_, "delete-event",
|
||||
base::BindRepeating(gtk_widget_hide_on_delete));
|
||||
signals_.emplace_back(dialog_, "response",
|
||||
base::BindRepeating(&GtkMessageBox::OnResponseDialog,
|
||||
base::Unretained(this)));
|
||||
Show();
|
||||
}
|
||||
|
||||
|
@ -184,8 +188,8 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
parent_ = nullptr;
|
||||
}
|
||||
|
||||
CHROMEG_CALLBACK_1(GtkMessageBox, void, OnResponseDialog, GtkWidget*, int);
|
||||
CHROMEG_CALLBACK_0(GtkMessageBox, void, OnCheckboxToggled, GtkWidget*);
|
||||
void OnResponseDialog(GtkWidget* widget, int response);
|
||||
void OnCheckboxToggled(GtkWidget* widget);
|
||||
|
||||
private:
|
||||
// The id of the dialog.
|
||||
|
@ -199,6 +203,7 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
raw_ptr<NativeWindow> parent_;
|
||||
RAW_PTR_EXCLUSION GtkWidget* dialog_;
|
||||
MessageBoxCallback callback_;
|
||||
std::vector<ScopedGSignal> signals_;
|
||||
};
|
||||
|
||||
void GtkMessageBox::OnResponseDialog(GtkWidget* widget, int response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue