parent
14eb2af876
commit
338604239d
3 changed files with 6 additions and 8 deletions
|
@ -54,12 +54,12 @@ void MenuViews::PopupAt(
|
|||
&MenuViews::ClosePopupAt, weak_factory_.GetWeakPtr(), window_id);
|
||||
menu_runners_[window_id] = std::unique_ptr<MenuRunner>(new MenuRunner(
|
||||
model(), flags, close_callback));
|
||||
ignore_result(menu_runners_[window_id]->RunMenuAt(
|
||||
menu_runners_[window_id]->RunMenuAt(
|
||||
static_cast<NativeWindowViews*>(window->window())->widget(),
|
||||
NULL,
|
||||
gfx::Rect(location, gfx::Size()),
|
||||
views::MENU_ANCHOR_TOPLEFT,
|
||||
ui::MENU_SOURCE_MOUSE));
|
||||
ui::MENU_SOURCE_MOUSE);
|
||||
}
|
||||
|
||||
void MenuViews::ClosePopupAt(int32_t window_id) {
|
||||
|
|
|
@ -38,12 +38,12 @@ void MenuDelegate::RunMenu(AtomMenuModel* model, views::MenuButton* button) {
|
|||
menu_runner_.reset(new views::MenuRunner(
|
||||
item,
|
||||
views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS));
|
||||
ignore_result(menu_runner_->RunMenuAt(
|
||||
menu_runner_->RunMenuAt(
|
||||
button->GetWidget()->GetTopLevelWidget(),
|
||||
button,
|
||||
bounds,
|
||||
views::MENU_ANCHOR_TOPRIGHT,
|
||||
ui::MENU_SOURCE_MOUSE));
|
||||
ui::MENU_SOURCE_MOUSE);
|
||||
}
|
||||
|
||||
void MenuDelegate::ExecuteCommand(int id) {
|
||||
|
@ -95,8 +95,7 @@ void MenuDelegate::WillHideMenu(views::MenuItemView* menu) {
|
|||
adapter_->WillHideMenu(menu);
|
||||
}
|
||||
|
||||
void MenuDelegate::OnMenuClosed(views::MenuItemView* menu,
|
||||
views::MenuRunner::RunResult result) {
|
||||
void MenuDelegate::OnMenuClosed(views::MenuItemView* menu) {
|
||||
// Only switch to new menu when current menu is closed.
|
||||
if (button_to_open_)
|
||||
button_to_open_->Activate(nullptr);
|
||||
|
|
|
@ -40,8 +40,7 @@ class MenuDelegate : public views::MenuDelegate {
|
|||
void SelectionChanged(views::MenuItemView* menu) override;
|
||||
void WillShowMenu(views::MenuItemView* menu) override;
|
||||
void WillHideMenu(views::MenuItemView* menu) override;
|
||||
void OnMenuClosed(views::MenuItemView* menu,
|
||||
views::MenuRunner::RunResult result) override;
|
||||
void OnMenuClosed(views::MenuItemView* menu) override;
|
||||
views::MenuItemView* GetSiblingMenu(
|
||||
views::MenuItemView* menu,
|
||||
const gfx::Point& screen_point,
|
||||
|
|
Loading…
Reference in a new issue