refactor: remove more unused menu api (#50774)

* chore: do not expose menu.isItemCheckedAt() to JS

Not used, documented, or typed. Added in dae98fa43f.

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: do not expose menu.isEnabledAt() to JS

Nto used, documented, or typed. Added in dae98fa43f.

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: do not expose menu.isVisibleAt() to JS

Not used, documented, or typed. Added in dae98fa43f.

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot]
2026-04-07 11:57:16 +00:00
committed by GitHub
parent 7e84164ed9
commit e258e0735d
2 changed files with 0 additions and 18 deletions

View File

@@ -270,18 +270,6 @@ std::u16string Menu::GetAcceleratorTextAtForTesting(int index) const {
return accelerator.GetShortcutText();
}
bool Menu::IsItemCheckedAt(int index) const {
return model_->IsItemCheckedAt(index);
}
bool Menu::IsEnabledAt(int index) const {
return model_->IsEnabledAt(index);
}
bool Menu::IsVisibleAt(int index) const {
return model_->IsVisibleAt(index);
}
void Menu::OnMenuWillClose() {
keep_alive_.Clear();
Emit("menu-will-close");
@@ -306,9 +294,6 @@ void Menu::FillObjectTemplate(v8::Isolate* isolate,
.SetMethod("setCustomType", &Menu::SetCustomType)
.SetMethod("clear", &Menu::Clear)
.SetMethod("getItemCount", &Menu::GetItemCount)
.SetMethod("isItemCheckedAt", &Menu::IsItemCheckedAt)
.SetMethod("isEnabledAt", &Menu::IsEnabledAt)
.SetMethod("isVisibleAt", &Menu::IsVisibleAt)
.SetMethod("popupAt", &Menu::PopupAt)
.SetMethod("closePopupAt", &Menu::ClosePopupAt)
.SetMethod("_getAcceleratorTextAt", &Menu::GetAcceleratorTextAtForTesting)

View File

@@ -131,9 +131,6 @@ class Menu : public gin::Wrappable<Menu>,
void Clear();
int GetIndexOfCommandId(int command_id) const;
int GetItemCount() const;
bool IsItemCheckedAt(int index) const;
bool IsEnabledAt(int index) const;
bool IsVisibleAt(int index) const;
gin_helper::SelfKeepAlive<Menu> keep_alive_{this};
};