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:
Per Lundberg
2013-07-29 09:36:34 +03:00
parent c88774a581
commit cfcd3e4c8a
4 changed files with 11 additions and 12 deletions
+5 -5
View File
@@ -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))
+3 -3
View File
@@ -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);
}
+2 -3
View File
@@ -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();
+1 -1
View File
@@ -70,7 +70,7 @@ namespace CefSharp
{
if (frame->IsMain())
{
_browserControl->Uri = gcnew Uri(StringUtils::ToClr(address));
_browserControl->SetAddress(StringUtils::ToClr(address));
}
}