chore: bump chromium to adc5df74b86afdff676989ced8cd3 (master) (#26223)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
Electron Bot 2020-11-13 16:16:56 -08:00 committed by GitHub
parent d6019634f9
commit e017d8714e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 496 additions and 804 deletions

View file

@ -20,8 +20,8 @@
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/keycodes/keysym_to_unicode.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/event.h"
#include "ui/gfx/x/keysyms/keysyms.h"
#include "ui/gfx/x/x11.h"
#include "ui/gfx/x/xproto.h"
// libdbusmenu-glib types

View file

@ -305,8 +305,11 @@ void MenuBar::RebuildChildren() {
RemoveAllChildViews(true);
for (int i = 0, n = GetItemCount(); i < n; ++i) {
auto* button =
new SubmenuButton(this, menu_model_->GetLabelAt(i), background_color_);
new SubmenuButton(menu_model_->GetLabelAt(i), background_color_);
button->set_tag(i);
button->SetCallback(base::BindRepeating(&MenuBar::ButtonPressed,
base::Unretained(this),
base::Unretained(button)));
AddChildView(button);
}
UpdateViewColors();

View file

@ -37,7 +37,6 @@ class MenuBarColorUpdater : public views::FocusChangeListener {
};
class MenuBar : public views::AccessiblePaneView,
public views::ButtonListener,
public electron::MenuDelegate::Observer {
public:
static const char kViewClassName[];
@ -75,15 +74,13 @@ class MenuBar : public views::AccessiblePaneView,
void RemovePaneFocus() override;
void OnThemeChanged() override;
protected:
private:
friend class MenuBarColorUpdater;
// views::View:
const char* GetClassName() const override;
// views::ButtonListener:
void ButtonPressed(views::Button* source, const ui::Event& event) override;
private:
friend class MenuBarColorUpdater;
void ButtonPressed(views::Button* source, const ui::Event& event);
void RebuildChildren();
void UpdateViewColors();

View file

@ -20,11 +20,10 @@
namespace electron {
SubmenuButton::SubmenuButton(views::ButtonListener* button_listener,
const base::string16& title,
SubmenuButton::SubmenuButton(const base::string16& title,
const SkColor& background_color)
: views::MenuButton(
views::Button::PressedCallback(button_listener, this),
PressedCallback(),
gfx::RemoveAcceleratorChar(title, '&', nullptr, nullptr)),
background_color_(background_color) {
#if defined(OS_LINUX)

View file

@ -16,9 +16,7 @@ namespace electron {
// Special button that used by menu bar to show submenus.
class SubmenuButton : public views::MenuButton {
public:
SubmenuButton(views::ButtonListener* button_listener,
const base::string16& title,
const SkColor& background_color);
SubmenuButton(const base::string16& title, const SkColor& background_color);
~SubmenuButton() override;
void SetAcceleratorVisibility(bool visible);