SimpleMenuModel::MenuClosed renamed to MenuWillClose

This commit is contained in:
Cheng Zhao 2017-01-23 17:53:53 +09:00 committed by Kevin Sawicki
parent c10eb73166
commit 7a7b72ce04
6 changed files with 10 additions and 10 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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;
}
}

View file

@ -35,7 +35,7 @@ class TrayIconCocoa : public TrayIcon,
protected:
// AtomMenuModel::Observer:
void MenuClosed() override;
void MenuWillClose() override;
private:
// Atom custom view for NSStatusItem.

View file

@ -405,7 +405,7 @@ gfx::Rect TrayIconCocoa::GetBounds() {
return bounds;
}
void TrayIconCocoa::MenuClosed() {
void TrayIconCocoa::MenuWillClose() {
[status_item_view_ setNeedsDisplay:YES];
}

2
vendor/brightray vendored

@ -1 +1 @@
Subproject commit 5f4cf42a6d8f611c859efdde20c085dcc4871919
Subproject commit d24b1b907ad366dc01d4d3d5da981b6164868230