mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Use .Net friendly property names.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CefSharp
|
||||
public FrameLoadEndEventArgs(IFrame frame, int httpStatusCode)
|
||||
{
|
||||
Frame = frame;
|
||||
Url = frame.GetUrl();
|
||||
Url = frame.Url;
|
||||
HttpStatusCode = httpStatusCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user