Use .Net friendly property names.

This commit is contained in:
Bill Tutt
2015-05-04 19:15:57 -04:00
parent ac0b52d646
commit 21efc10628
6 changed files with 54 additions and 30 deletions
+8 -8
View File
@@ -11,7 +11,7 @@
// True if this object is currently attached to a valid frame.
///
/*--cef()--*/
bool CefFrameWrapper::IsValid()
bool CefFrameWrapper::IsValid::get()
{
return _frame->IsValid();
}
@@ -171,7 +171,7 @@ Task<JavascriptResponse^>^ CefFrameWrapper::EvaluateScriptAsync(String^ script,
// Returns true if this is the main (top-level) frame.
///
/*--cef()--*/
bool CefFrameWrapper::IsMain()
bool CefFrameWrapper::IsMain::get()
{
return _frame->IsMain();
}
@@ -180,7 +180,7 @@ bool CefFrameWrapper::IsMain()
// Returns true if this is the focused frame.
///
/*--cef()--*/
bool CefFrameWrapper::IsFocused()
bool CefFrameWrapper::IsFocused::get()
{
return _frame->IsFocused();
}
@@ -193,7 +193,7 @@ bool CefFrameWrapper::IsFocused()
// value.
///
/*--cef()--*/
String^ CefFrameWrapper::GetName()
String^ CefFrameWrapper::Name::get()
{
return StringUtils::ToClr(_frame->GetName());
}
@@ -202,7 +202,7 @@ String^ CefFrameWrapper::GetName()
// Returns the globally unique identifier for this frame.
///
/*--cef()--*/
Int64 CefFrameWrapper::GetIdentifier()
Int64 CefFrameWrapper::Identifier::get()
{
return _frame->GetIdentifier();
}
@@ -212,7 +212,7 @@ Int64 CefFrameWrapper::GetIdentifier()
// frame.
///
/*--cef()--*/
IFrame^ CefFrameWrapper::GetParent()
IFrame^ CefFrameWrapper::Parent::get()
{
auto parent = _frame->GetParent();
if (parent != nullptr)
@@ -226,7 +226,7 @@ IFrame^ CefFrameWrapper::GetParent()
// Returns the URL currently loaded in this frame.
///
/*--cef()--*/
String^ CefFrameWrapper::GetUrl()
String^ CefFrameWrapper::Url::get()
{
return StringUtils::ToClr(_frame->GetURL());
}
@@ -235,7 +235,7 @@ String^ CefFrameWrapper::GetUrl()
// Returns the browser that this frame belongs to.
///
/*--cef()--*/
IBrowser^ CefFrameWrapper::GetBrowser()
IBrowser^ CefFrameWrapper::Browser::get()
{
return dynamic_cast<IBrowser^>(gcnew CefSharpBrowserWrapper(_frame->GetBrowser(), _browserAdapter));
}
+33 -10
View File
@@ -37,7 +37,10 @@ namespace CefSharp
// True if this object is currently attached to a valid frame.
///
/*--cef()--*/
virtual bool IsValid();
virtual property bool IsValid
{
bool get();
}
///
// Execute undo in this frame.
@@ -145,13 +148,19 @@ namespace CefSharp
// Returns true if this is the main (top-level) frame.
///
/*--cef()--*/
virtual bool IsMain();
virtual property bool IsMain
{
bool get();
}
///
// Returns true if this is the focused frame.
///
/*--cef()--*/
virtual bool IsFocused();
virtual property bool IsFocused
{
bool get();
}
///
// Returns the name for this frame. If the frame has an assigned name (for
@@ -161,34 +170,48 @@ namespace CefSharp
// value.
///
/*--cef()--*/
virtual String^ GetName();
virtual property String^ Name
{
String^ get();
}
///
// Returns the globally unique identifier for this frame.
///
/*--cef()--*/
virtual System::Int64 GetIdentifier();
virtual property Int64 Identifier
{
Int64 get();
}
///
// Returns the parent of this frame or NULL if this is the main (top-level)
// frame.
///
/*--cef()--*/
virtual IFrame^ GetParent() = IFrame::GetParent;
virtual property IFrame^ Parent
{
IFrame^ get();
}
// = IFrame::GetParent;
///
// Returns the URL currently loaded in this frame.
///
/*--cef()--*/
virtual String^ GetUrl();
virtual property String^ Url
{
String^ get();
}
// NOTE: Don't expose this yet, because it
// would be a HUGE breaking change.
///
// Returns the browser that this frame belongs to.
///
/*--cef()--*/
virtual IBrowser^ GetBrowser();
virtual property IBrowser^ Browser
{
IBrowser^ get();
}
///
// Get the V8 context associated with the frame. This method can only be
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CefSharp
public FrameLoadEndEventArgs(IFrame frame, int httpStatusCode)
{
Frame = frame;
Url = frame.GetUrl();
Url = frame.Url;
HttpStatusCode = httpStatusCode;
}
+2 -2
View File
@@ -14,8 +14,8 @@ namespace CefSharp
public FrameLoadStartEventArgs(IFrame frame)
{
Frame = frame;
Url = frame.GetUrl();
IsMainFrame = frame.IsMain();
Url = frame.Url;
IsMainFrame = frame.IsMain;
}
/// <summary>
+9 -8
View File
@@ -15,7 +15,7 @@ namespace CefSharp
/// </summary>
public interface IFrame
{
bool IsValid();
bool IsValid { get; }
///
// Execute undo in this frame.
@@ -120,13 +120,14 @@ namespace CefSharp
// Returns true if this is the main (top-level) frame.
///
/*--cef()--*/
bool IsMain();
bool IsMain { get; }
///
// Returns true if this is the focused frame.
///
/*--cef()--*/
bool IsFocused();
bool IsFocused { get; }
///
// Returns the name for this frame. If the frame has an assigned name (for
@@ -136,31 +137,31 @@ namespace CefSharp
// value.
///
/*--cef()--*/
string GetName();
string Name { get; }
///
// Returns the globally unique identifier for this frame.
///
/*--cef()--*/
Int64 GetIdentifier();
Int64 Identifier { get; }
///
// Returns the parent of this frame or NULL if this is the main (top-level)
// frame.
///
/*--cef()--*/
IFrame GetParent();
IFrame Parent { get; }
///
// Returns the URL currently loaded in this frame.
///
/*--cef()--*/
string GetUrl();
string Url { get; }
///
// Returns the browser that this frame belongs to.
///
/*--cef()--*/
//IBrowser GetBrowser();
IBrowser Browser { get; }
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace CefSharp
public LoadErrorEventArgs(IFrame frame, CefErrorCode errorCode, string errorText)
{
Frame = frame;
FailedUrl = frame.GetUrl();
FailedUrl = frame.Url;
ErrorCode = errorCode;
ErrorText = errorText;
}