mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 19:54:53 +00:00
Made the exposure of CefBrowserHost more generic, since we will use it for many other use cases shortly.
This commit is contained in:
@@ -85,16 +85,17 @@ namespace CefSharp
|
||||
_renderWebBrowser->SetCursor((IntPtr) cursor);
|
||||
}
|
||||
|
||||
void WasResized()
|
||||
CefRefPtr<CefBrowserHost> TryGetCefHost()
|
||||
{
|
||||
if (this->GetCefBrowser() == nullptr ||
|
||||
this->GetCefBrowser()->GetHost() == nullptr)
|
||||
{
|
||||
return;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->GetCefBrowser()->GetHost();
|
||||
}
|
||||
|
||||
this->GetCefBrowser()->GetHost()->WasResized();
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -42,7 +42,12 @@ namespace CefSharp
|
||||
|
||||
void WasResized()
|
||||
{
|
||||
_renderClientAdapterInternal->WasResized();
|
||||
auto cefHost = _renderClientAdapterInternal->TryGetCefHost();
|
||||
|
||||
if (cefHost != nullptr)
|
||||
{
|
||||
cefHost->WasResized();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user