diff --git a/CefSharp/BrowserCore.h b/CefSharp/BrowserCore.h index ce06a684a..526c2e6f4 100644 --- a/CefSharp/BrowserCore.h +++ b/CefSharp/BrowserCore.h @@ -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)) diff --git a/CefSharp/CefBrowserWrapper.h b/CefSharp/CefBrowserWrapper.h index 5fc973cc7..314929cd7 100644 --- a/CefSharp/CefBrowserWrapper.h +++ b/CefSharp/CefBrowserWrapper.h @@ -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(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); } diff --git a/CefSharp/IWebBrowser.h b/CefSharp/IWebBrowser.h index cf6a2301d..22f1a78c1 100644 --- a/CefSharp/IWebBrowser.h +++ b/CefSharp/IWebBrowser.h @@ -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(); diff --git a/CefSharp/Internals/ClientAdapter.cpp b/CefSharp/Internals/ClientAdapter.cpp index e739cb062..9c54f56a5 100644 --- a/CefSharp/Internals/ClientAdapter.cpp +++ b/CefSharp/Internals/ClientAdapter.cpp @@ -70,7 +70,7 @@ namespace CefSharp { if (frame->IsMain()) { - _browserControl->Uri = gcnew Uri(StringUtils::ToClr(address)); + _browserControl->SetAddress(StringUtils::ToClr(address)); } }