From 9cae04edde0583419f35a918cb922d64d9971c7b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 3 Oct 2016 10:26:18 -0700 Subject: [PATCH] Remove unused ButtonListener --- atom/browser/ui/views/menu_bar.cc | 6 +----- atom/browser/ui/views/menu_bar.h | 5 ----- atom/browser/ui/views/submenu_button.cc | 3 +-- atom/browser/ui/views/submenu_button.h | 3 +-- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/atom/browser/ui/views/menu_bar.cc b/atom/browser/ui/views/menu_bar.cc index 0530ec6d4010..bd7c4fcac9db 100644 --- a/atom/browser/ui/views/menu_bar.cc +++ b/atom/browser/ui/views/menu_bar.cc @@ -63,8 +63,7 @@ void MenuBar::SetMenu(AtomMenuModel* model) { RemoveAllChildViews(true); for (int i = 0; i < model->GetItemCount(); ++i) { - SubmenuButton* button = new SubmenuButton(this, - model->GetLabelAt(i), + SubmenuButton* button = new SubmenuButton(model->GetLabelAt(i), this, background_color_); button->set_tag(i); @@ -134,9 +133,6 @@ const char* MenuBar::GetClassName() const { return kViewClassName; } -void MenuBar::ButtonPressed(views::Button* sender, const ui::Event& event) { -} - void MenuBar::OnMenuButtonClicked(views::MenuButton* source, const gfx::Point& point, const ui::Event* event) { diff --git a/atom/browser/ui/views/menu_bar.h b/atom/browser/ui/views/menu_bar.h index 5b86e292c887..0f371ea0ce7f 100644 --- a/atom/browser/ui/views/menu_bar.h +++ b/atom/browser/ui/views/menu_bar.h @@ -6,7 +6,6 @@ #define ATOM_BROWSER_UI_VIEWS_MENU_BAR_H_ #include "atom/browser/ui/atom_menu_model.h" -#include "ui/views/controls/button/button.h" #include "ui/views/controls/button/menu_button_listener.h" #include "ui/views/view.h" @@ -19,7 +18,6 @@ namespace atom { class MenuDelegate; class MenuBar : public views::View, - public views::ButtonListener, public views::MenuButtonListener { public: MenuBar(); @@ -50,9 +48,6 @@ class MenuBar : public views::View, // views::View: const char* GetClassName() const override; - // views::ButtonListener: - void ButtonPressed(views::Button* sender, const ui::Event& event) override; - // views::MenuButtonListener: void OnMenuButtonClicked(views::MenuButton* source, const gfx::Point& point, diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index fc012bdb9f10..2b3562022808 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -26,8 +26,7 @@ base::string16 FilterAccelerator(const base::string16& label) { } // namespace -SubmenuButton::SubmenuButton(views::ButtonListener* listener, - const base::string16& title, +SubmenuButton::SubmenuButton(const base::string16& title, views::MenuButtonListener* menu_button_listener, const SkColor& background_color) : views::MenuButton(FilterAccelerator(title), diff --git a/atom/browser/ui/views/submenu_button.h b/atom/browser/ui/views/submenu_button.h index c798b02c8d93..02e25cd0deb5 100644 --- a/atom/browser/ui/views/submenu_button.h +++ b/atom/browser/ui/views/submenu_button.h @@ -13,8 +13,7 @@ namespace atom { // Special button that used by menu bar to show submenus. class SubmenuButton : public views::MenuButton { public: - SubmenuButton(views::ButtonListener* listener, - const base::string16& title, + SubmenuButton(const base::string16& title, views::MenuButtonListener* menu_button_listener, const SkColor& background_color); virtual ~SubmenuButton();