Bug 1903508 - Part 1: Add a GetKeyboardLayout() interface to LookAndFeel abstraction. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D215070
This commit is contained in:
Tim Huang 2024-07-10 12:17:49 +00:00
parent d5ed5a606e
commit b0f07ca102
3 changed files with 11 additions and 0 deletions

View File

@ -555,6 +555,8 @@ class LookAndFeel {
}
}
static nsresult GetKeyboardLayout(nsACString& aLayout);
protected:
static void DoHandleGlobalThemeChange();
// Set to true when ThemeChanged needs to be called on mTheme (and other

View File

@ -1550,4 +1550,9 @@ void LookAndFeel::SetData(widget::FullLookAndFeel&& aTables) {
nsLookAndFeel::GetInstance()->SetDataImpl(std::move(aTables));
}
// static
nsresult LookAndFeel::GetKeyboardLayout(nsACString& aLayout) {
return nsLookAndFeel::GetInstance()->GetKeyboardLayoutImpl(aLayout);
}
} // namespace mozilla

View File

@ -72,6 +72,10 @@ class nsXPLookAndFeel : public mozilla::LookAndFeel {
virtual void GetThemeInfo(nsACString&) {}
virtual nsresult GetKeyboardLayoutImpl(nsACString& aLayout) {
return NS_ERROR_NOT_IMPLEMENTED;
}
protected:
nsXPLookAndFeel() = default;