fix: send NSView* as the response to getNativeWindowHandle() instead of a null handle (#15521) (#15803)

This commit is contained in:
Tom Moor 2018-11-27 18:00:37 -08:00 committed by Cheng Zhao
parent 3ed5a24c72
commit 250a09a43f
6 changed files with 22 additions and 2 deletions

View file

@ -1079,6 +1079,11 @@ gfx::AcceleratedWidget NativeWindowMac::GetAcceleratedWidget() const {
return gfx::kNullAcceleratedWidget;
}
std::tuple<void*, int> NativeWindowMac::GetNativeWindowHandlePointer() const {
NSView* view = [window_ contentView];
return std::make_tuple(static_cast<void*>(view), sizeof(view));
}
void NativeWindowMac::SetProgressBar(double progress,
const NativeWindow::ProgressState state) {
NSDockTile* dock_tile = [NSApp dockTile];