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

This commit is contained in:
Samuel Attard 2018-11-09 04:03:19 +11:00 committed by Shelley Vohr
parent 746beb0d8b
commit 9aed2a465f
6 changed files with 22 additions and 2 deletions

View file

@ -10,6 +10,7 @@
#endif
#include <memory>
#include <tuple>
#include <utility>
#include <vector>
@ -1052,6 +1053,11 @@ gfx::AcceleratedWidget NativeWindowViews::GetAcceleratedWidget() const {
return GetNativeWindow()->GetHost()->GetAcceleratedWidget();
}
std::tuple<void*, int> NativeWindowViews::GetNativeWindowHandlePointer() const {
gfx::AcceleratedWidget handle = GetAcceleratedWidget();
return std::make_tuple(static_cast<void*>(&handle), sizeof(handle));
}
gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(
const gfx::Rect& bounds) const {
if (!has_frame())