mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
I give up with this one. It makes more sense to have this as a string after all, so then we might as well use the previous name (Address). The "SetAddress" method is internal and shouldn't really be used from the outside. We might be closing in to the point where we should split IWebBrowser into two parts - IWebBrowser (which is exposed to external consumers) and IWebBrowserInternal (an internal interface mostly needed between CefSharp and CefSharp.Wpf/CefSharp.WinForms).
This commit is contained in:
@@ -33,7 +33,7 @@ namespace CefSharp
|
||||
int _contentsHeight;
|
||||
|
||||
String^ _tooltip;
|
||||
Uri^ _address;
|
||||
String^ _address;
|
||||
String^ _title;
|
||||
|
||||
ILifeSpanHandler^ _lifeSpanHandler;
|
||||
@@ -48,7 +48,7 @@ namespace CefSharp
|
||||
public:
|
||||
virtual event PropertyChangedEventHandler^ PropertyChanged;
|
||||
|
||||
BrowserCore(Uri^ address)
|
||||
BrowserCore(String^ address)
|
||||
{
|
||||
_loadCompleted = gcnew RtzCountdownEvent();
|
||||
_address = address;
|
||||
@@ -75,11 +75,11 @@ namespace CefSharp
|
||||
bool get() { return _canGoForward; }
|
||||
}
|
||||
|
||||
property Uri^ Address
|
||||
property String^ Address
|
||||
{
|
||||
Uri^ get() { return _address; }
|
||||
String^ get() { return _address; }
|
||||
|
||||
void set(Uri^ address)
|
||||
void set(String^ address)
|
||||
{
|
||||
if (_address != nullptr &&
|
||||
_address->Equals(address))
|
||||
|
||||
@@ -62,14 +62,14 @@ namespace CefSharp
|
||||
_renderClientAdapter = nullptr;
|
||||
}
|
||||
|
||||
void CreateOffscreenBrowser(BrowserSettings^ browserSettings, IntPtr^ sourceHandle, Uri^ uri)
|
||||
void CreateOffscreenBrowser(BrowserSettings^ browserSettings, IntPtr^ sourceHandle, String^ address)
|
||||
{
|
||||
HWND hwnd = static_cast<HWND>(sourceHandle->ToPointer());
|
||||
CefWindowInfo window;
|
||||
window.SetAsOffScreen(hwnd);
|
||||
CefString url = StringUtils::ToNative(uri->ToString());
|
||||
CefString addressNative = StringUtils::ToNative(address);
|
||||
|
||||
CefBrowserHost::CreateBrowser(window, _renderClientAdapter, url,
|
||||
CefBrowserHost::CreateBrowser(window, _renderClientAdapter, addressNative,
|
||||
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CefSharp
|
||||
property bool CanGoBack { bool get(); }
|
||||
property bool CanGoForward { bool get(); }
|
||||
|
||||
property Uri^ Uri;
|
||||
property String^ Address;
|
||||
property String^ Title;
|
||||
property String^ TooltipText;
|
||||
|
||||
@@ -44,8 +44,7 @@ namespace CefSharp
|
||||
|
||||
void OnInitialized();
|
||||
|
||||
void Load(String^ adress);
|
||||
void Load(::Uri^ uri);
|
||||
void SetAddress(String^ address);
|
||||
void LoadHtml(String^ html);
|
||||
void Stop();
|
||||
void Back();
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CefSharp
|
||||
{
|
||||
if (frame->IsMain())
|
||||
{
|
||||
_browserControl->Uri = gcnew Uri(StringUtils::ToClr(address));
|
||||
_browserControl->SetAddress(StringUtils::ToClr(address));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user