From 7a7b72ce0466391021fc84da2790aa3c88b88e32 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 Jan 2017 17:53:53 +0900 Subject: [PATCH] SimpleMenuModel::MenuClosed renamed to MenuWillClose --- atom/browser/ui/atom_menu_model.cc | 6 +++--- atom/browser/ui/atom_menu_model.h | 4 ++-- atom/browser/ui/cocoa/atom_menu_controller.mm | 4 ++-- atom/browser/ui/tray_icon_cocoa.h | 2 +- atom/browser/ui/tray_icon_cocoa.mm | 2 +- vendor/brightray | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/atom/browser/ui/atom_menu_model.cc b/atom/browser/ui/atom_menu_model.cc index 3f0d1bbfa8a2..b6a9ba6a7265 100644 --- a/atom/browser/ui/atom_menu_model.cc +++ b/atom/browser/ui/atom_menu_model.cc @@ -40,9 +40,9 @@ bool AtomMenuModel::GetAcceleratorAtWithParams( return false; } -void AtomMenuModel::MenuClosed() { - ui::SimpleMenuModel::MenuClosed(); - FOR_EACH_OBSERVER(Observer, observers_, MenuClosed()); +void AtomMenuModel::MenuWillClose() { + ui::SimpleMenuModel::MenuWillClose(); + FOR_EACH_OBSERVER(Observer, observers_, MenuWillClose()); } AtomMenuModel* AtomMenuModel::GetSubmenuModelAt(int index) { diff --git a/atom/browser/ui/atom_menu_model.h b/atom/browser/ui/atom_menu_model.h index e7d6fc92c00e..7bf734b74c3d 100644 --- a/atom/browser/ui/atom_menu_model.h +++ b/atom/browser/ui/atom_menu_model.h @@ -37,7 +37,7 @@ class AtomMenuModel : public ui::SimpleMenuModel { virtual ~Observer() {} // Notifies the menu has been closed. - virtual void MenuClosed() {} + virtual void MenuWillClose() {} }; explicit AtomMenuModel(Delegate* delegate); @@ -53,7 +53,7 @@ class AtomMenuModel : public ui::SimpleMenuModel { ui::Accelerator* accelerator) const; // ui::SimpleMenuModel: - void MenuClosed() override; + void MenuWillClose() override; using SimpleMenuModel::GetSubmenuModelAt; AtomMenuModel* GetSubmenuModelAt(int index); diff --git a/atom/browser/ui/cocoa/atom_menu_controller.mm b/atom/browser/ui/cocoa/atom_menu_controller.mm index 365317f653c3..6bdaa4c7805e 100644 --- a/atom/browser/ui/cocoa/atom_menu_controller.mm +++ b/atom/browser/ui/cocoa/atom_menu_controller.mm @@ -90,7 +90,7 @@ Role kRolesMap[] = { - (void)cancel { if (isMenuOpen_) { [menu_ cancelTracking]; - model_->MenuClosed(); + model_->MenuWillClose(); isMenuOpen_ = NO; } } @@ -265,7 +265,7 @@ Role kRolesMap[] = { - (void)menuDidClose:(NSMenu*)menu { if (isMenuOpen_) { - model_->MenuClosed(); + model_->MenuWillClose(); isMenuOpen_ = NO; } } diff --git a/atom/browser/ui/tray_icon_cocoa.h b/atom/browser/ui/tray_icon_cocoa.h index fb66a6b3f147..7680b6f30f83 100644 --- a/atom/browser/ui/tray_icon_cocoa.h +++ b/atom/browser/ui/tray_icon_cocoa.h @@ -35,7 +35,7 @@ class TrayIconCocoa : public TrayIcon, protected: // AtomMenuModel::Observer: - void MenuClosed() override; + void MenuWillClose() override; private: // Atom custom view for NSStatusItem. diff --git a/atom/browser/ui/tray_icon_cocoa.mm b/atom/browser/ui/tray_icon_cocoa.mm index b3f5e647d3bf..1ecd51fe566a 100644 --- a/atom/browser/ui/tray_icon_cocoa.mm +++ b/atom/browser/ui/tray_icon_cocoa.mm @@ -405,7 +405,7 @@ gfx::Rect TrayIconCocoa::GetBounds() { return bounds; } -void TrayIconCocoa::MenuClosed() { +void TrayIconCocoa::MenuWillClose() { [status_item_view_ setNeedsDisplay:YES]; } diff --git a/vendor/brightray b/vendor/brightray index 5f4cf42a6d8f..d24b1b907ad3 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 5f4cf42a6d8f611c859efdde20c085dcc4871919 +Subproject commit d24b1b907ad366dc01d4d3d5da981b6164868230