feat: add tabbingIdentifier property to BrowserWindow (#39980)

feat: add tabbingIdentifier property to BrowserWindow
This commit is contained in:
Shelley Vohr 2023-10-03 21:27:40 +02:00 committed by GitHub
parent 04b2ba84cd
commit 713d8c4167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 6 deletions

View file

@ -1643,6 +1643,13 @@ bool NativeWindowMac::AddTabbedWindow(NativeWindow* window) {
return true;
}
absl::optional<std::string> NativeWindowMac::GetTabbingIdentifier() const {
if ([window_ tabbingMode] == NSWindowTabbingModeDisallowed)
return absl::nullopt;
return base::SysNSStringToUTF8([window_ tabbingIdentifier]);
}
void NativeWindowMac::SetAspectRatio(double aspect_ratio,
const gfx::Size& extra_size) {
NativeWindow::SetAspectRatio(aspect_ratio, extra_size);