Made the exposure of CefBrowserHost more generic, since we will use it for many other use cases shortly.

This commit is contained in:
Per Lundberg
2013-07-23 23:09:12 +03:00
parent 192d72e5f0
commit 29bc05fab1
2 changed files with 12 additions and 6 deletions
@@ -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:
+6 -1
View File
@@ -42,7 +42,12 @@ namespace CefSharp
void WasResized()
{
_renderClientAdapterInternal->WasResized();
auto cefHost = _renderClientAdapterInternal->TryGetCefHost();
if (cefHost != nullptr)
{
cefHost->WasResized();
}
}
};
}