Skip to content

Commit bea70cc

Browse files
committed
Xml Doc improvements
Fix some invalid markup Move some unmanaged constructors and implicit conversion to internal
1 parent cc8c7f0 commit bea70cc

File tree

11 files changed

+96
-58
lines changed

11 files changed

+96
-58
lines changed

CefSharp.Core/BrowserSettings.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ namespace CefSharp
2020
internal:
2121
CefBrowserSettings* _browserSettings;
2222

23-
public:
2423
/// <summary>
25-
/// Default Constructor
24+
/// Internal Constructor
2625
/// </summary>
27-
BrowserSettings() : _browserSettings(new CefBrowserSettings())
26+
BrowserSettings(CefBrowserSettings* browserSettings)
2827
{
28+
_browserSettings = browserSettings;
2929
}
3030

31+
public:
3132
/// <summary>
32-
/// Internal Constructor
33+
/// Default Constructor
3334
/// </summary>
34-
BrowserSettings(CefBrowserSettings* browserSettings)
35+
BrowserSettings() : _browserSettings(new CefBrowserSettings())
3536
{
36-
_browserSettings = browserSettings;
3737
}
3838

3939
!BrowserSettings()

CefSharp.Core/Cef.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace CefSharp
135135
/// applicaiton thread (Typically the UI thead). If you call them on different
136136
/// threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
137137
/// </summary>
138-
/// <return>true if successful; otherwise, false.</return>
138+
/// <returns>true if successful; otherwise, false.</returns>
139139
static bool Initialize()
140140
{
141141
auto cefSettings = gcnew CefSettings();
@@ -149,7 +149,7 @@ namespace CefSharp
149149
/// threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
150150
/// </summary>
151151
/// <param name="cefSettings">CefSharp configuration settings.</param>
152-
/// <return>true if successful; otherwise, false.</return>
152+
/// <returns>true if successful; otherwise, false.</returns>
153153
static bool Initialize(CefSettings^ cefSettings)
154154
{
155155
return Initialize(cefSettings, false, nullptr);
@@ -163,7 +163,7 @@ namespace CefSharp
163163
/// </summary>
164164
/// <param name="cefSettings">CefSharp configuration settings.</param>
165165
/// <param name="performDependencyCheck">Check that all relevant dependencies avaliable, throws exception if any are missing</param>
166-
/// <return>true if successful; otherwise, false.</return>
166+
/// <returns>true if successful; otherwise, false.</returns>
167167
static bool Initialize(CefSettings^ cefSettings, bool performDependencyCheck, IBrowserProcessHandler^ browserProcessHandler)
168168
{
169169
if (IsInitialized)
@@ -460,7 +460,7 @@ namespace CefSharp
460460
/// <summary>
461461
/// Clear all registered scheme handler factories.
462462
/// </summary>
463-
/// <return>Returns false on error.</return>
463+
/// <returns>Returns false on error.</returns>
464464
static bool ClearSchemeHandlerFactories()
465465
{
466466
return CefClearSchemeHandlerFactories();
@@ -478,7 +478,7 @@ namespace CefSharp
478478
/// Async returns a list containing Plugin Information
479479
/// (Wrapper around CefVisitWebPluginInfo)
480480
/// </summary>
481-
/// <return>Returns List of <see cref="Plugin"/> structs.</return>
481+
/// <returns>Returns List of <see cref="Plugin"/> structs.</returns>
482482
static Task<List<WebPluginInfo^>^>^ GetPlugins()
483483
{
484484
auto taskVisitor = gcnew TaskWebPluginInfoVisitor();
@@ -521,7 +521,7 @@ namespace CefSharp
521521
/// This function bypasses any user permission checks so should only be
522522
/// used by code that is allowed to access location information.
523523
/// </summary>
524-
/// <return>Returns 'best available' location info or, if the location update failed, with error info.</return>
524+
/// <returns>Returns 'best available' location info or, if the location update failed, with error info.</returns>
525525
static bool GetGeolocation(IGetGeolocationCallback^ callback)
526526
{
527527
CefRefPtr<CefGetGeolocationCallback> wrapper = callback == nullptr ? NULL : new CefGetGeolocationCallbackAdapter(callback);
@@ -534,7 +534,7 @@ namespace CefSharp
534534
/// This function bypasses any user permission checks so should only be
535535
/// used by code that is allowed to access location information.
536536
/// </summary>
537-
/// <return>Returns 'best available' location info or, if the location update failed, with error info.</return>
537+
/// <returns>Returns 'best available' location info or, if the location update failed, with error info.</returns>
538538
static Task<Geoposition^>^ GetGeolocationAsync()
539539
{
540540
auto callback = gcnew TaskGetGeolocationCallback();
@@ -547,7 +547,7 @@ namespace CefSharp
547547
/// <summary>
548548
/// Returns true if called on the specified CEF thread.
549549
/// </summary>
550-
/// <return>Returns true if called on the specified thread.</return>
550+
/// <returns>Returns true if called on the specified thread.</returns>
551551
static bool CurrentlyOnThread(CefThreadIds threadId)
552552
{
553553
return CefCurrentlyOn((CefThreadId)threadId);
@@ -556,7 +556,7 @@ namespace CefSharp
556556
/// <summary>
557557
/// Gets the Global Request Context. Make sure to Dispose of this object when finished.
558558
/// </summary>
559-
/// <return>Returns the global request context or null.</return>
559+
/// <returns>Returns the global request context or null.</returns>
560560
static IRequestContext^ GetGlobalRequestContext()
561561
{
562562
auto context = CefRequestContext::GetGlobalContext();
@@ -646,7 +646,7 @@ namespace CefSharp
646646
/// if your key is named "mykey" then the value will be broken into ordered
647647
/// chunks and submitted using keys named "mykey-1", "mykey-2", etc.
648648
/// </summary>
649-
/// <return>Returns the global request context or null.</return>
649+
/// <returns>Returns the global request context or null.</returns>
650650
static property bool CrashReportingEnabled
651651
{
652652
bool get()
@@ -722,7 +722,7 @@ namespace CefSharp
722722
/// See <see cref="RegisterWidevineCdm(String, IRegisterCdmCallback)"/> for more details.
723723
/// </summary>
724724
/// <param name="path"> is a directory that contains the Widevine CDM files</param>
725-
/// <return>Returns a Task that can be awaited to receive the <see cref="CdmRegistration"/> response.</return>
725+
/// <returns>Returns a Task that can be awaited to receive the <see cref="CdmRegistration"/> response.</returns>
726726
static Task<CdmRegistration^>^ RegisterWidevineCdmAsync(String^ path)
727727
{
728728
auto callback = gcnew TaskRegisterCdmCallback();

CefSharp.Core/CookieManager.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ namespace CefSharp
2525

2626
}
2727

28+
operator CefRefPtr<CefCookieManager>()
29+
{
30+
if (this == nullptr)
31+
{
32+
return NULL;
33+
}
34+
return _cookieManager.get();
35+
}
36+
2837
public:
2938
///
3039
// Creates a new cookie manager. If |path| is empty data will be stored in
@@ -68,14 +77,5 @@ namespace CefSharp
6877
return !_cookieManager.get();
6978
}
7079
}
71-
72-
operator CefRefPtr<CefCookieManager>()
73-
{
74-
if (this == nullptr)
75-
{
76-
return NULL;
77-
}
78-
return _cookieManager.get();
79-
}
8080
};
8181
}

CefSharp.Core/RequestContext.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ namespace CefSharp
4444
_settings = nullptr;
4545
}
4646

47+
operator CefRefPtr<CefRequestContext>()
48+
{
49+
if (this == nullptr)
50+
{
51+
return NULL;
52+
}
53+
return _requestContext.get();
54+
}
55+
4756
public:
4857
RequestContext()
4958
{
@@ -367,7 +376,7 @@ namespace CefSharp
367376
/// Attempts to resolve origin to a list of associated IP addresses.
368377
/// </summary>
369378
/// <param name="origin">host name to resolve</param>
370-
/// <return>A task that represents the Resoolve Host operation. The value of the TResult parameter contains ResolveCallbackResult.</return>
379+
/// <returns>A task that represents the Resoolve Host operation. The value of the TResult parameter contains ResolveCallbackResult.</returns>
371380
virtual Task<ResolveCallbackResult>^ ResolveHostAsync(Uri^ origin)
372381
{
373382
ThrowIfDisposed();
@@ -402,14 +411,5 @@ namespace CefSharp
402411

403412
return (CefErrorCode)errorCode;
404413
}
405-
406-
operator CefRefPtr<CefRequestContext>()
407-
{
408-
if(this == nullptr)
409-
{
410-
return NULL;
411-
}
412-
return _requestContext.get();
413-
}
414414
};
415415
}

CefSharp.Core/RequestContextSettings.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ namespace CefSharp
1717
private:
1818
CefRequestContextSettings* _settings;
1919

20+
internal:
21+
operator CefRequestContextSettings()
22+
{
23+
return *_settings;
24+
}
25+
2026
public:
2127
/// <summary>
2228
/// Default constructor
@@ -102,10 +108,5 @@ namespace CefSharp
102108
bool get() { return _settings->ignore_certificate_errors == 1; }
103109
void set(bool value) { _settings->ignore_certificate_errors = value; }
104110
}
105-
106-
operator CefRequestContextSettings()
107-
{
108-
return *_settings;
109-
}
110111
};
111112
}

CefSharp/AsyncExtensions.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@
88

99
namespace CefSharp
1010
{
11+
/// <summary>
12+
/// Async extensions for different interfaces
13+
/// </summary>
1114
public static class AsyncExtensions
1215
{
1316
/// <summary>
1417
/// Deletes all cookies that matches all the provided parameters asynchronously.
1518
/// If both <paramref name="url"/> and <paramref name="name"/> are empty, all cookies will be deleted.
1619
/// </summary>
20+
/// <param name="cookieManager">cookie manager</param>
1721
/// <param name="url">The cookie URL. If an empty string is provided, any URL will be matched.</param>
1822
/// <param name="name">The name of the cookie. If an empty string is provided, any URL will be matched.</param>
19-
/// <return>Returns -1 if a non-empty invalid URL is specified, or if cookies cannot be accessed;
20-
/// otherwise, a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown.</return>
23+
/// <returns>Returns -1 if a non-empty invalid URL is specified, or if cookies cannot be accessed;
24+
/// otherwise, a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown.</returns>
2125
public static Task<int> DeleteCookiesAsync(this ICookieManager cookieManager, string url = null, string name = null)
2226
{
2327
if(cookieManager == null)
@@ -48,8 +52,8 @@ public static Task<int> DeleteCookiesAsync(this ICookieManager cookieManager, st
4852
/// <param name="cookieManager">cookie manager</param>
4953
/// <param name="url">The cookie URL. If an empty string is provided, any URL will be matched.</param>
5054
/// <param name="cookie">the cookie to be set</param>
51-
/// <return>returns false if the cookie cannot be set (e.g. if illegal charecters such as ';' are used);
52-
/// otherwise task that represents the set operation. The value of the TResult parameter contains a bool to indicate success.</return>
55+
/// <returns>returns false if the cookie cannot be set (e.g. if illegal charecters such as ';' are used);
56+
/// otherwise task that represents the set operation. The value of the TResult parameter contains a bool to indicate success.</returns>
5357
public static Task<bool> SetCookieAsync(this ICookieManager cookieManager, string url, Cookie cookie)
5458
{
5559
if (cookieManager == null)
@@ -75,8 +79,9 @@ public static Task<bool> SetCookieAsync(this ICookieManager cookieManager, strin
7579
/// <summary>
7680
/// Visits all cookies. The returned cookies are sorted by longest path, then by earliest creation date.
7781
/// </summary>
78-
/// <return>A task that represents the VisitAllCookies operation. The value of the TResult parameter contains a List of cookies
79-
/// or null if cookies cannot be accessed.</return>
82+
/// <param name="cookieManager">cookie manager</param>
83+
/// <returns>A task that represents the VisitAllCookies operation. The value of the TResult parameter contains a List of cookies
84+
/// or null if cookies cannot be accessed.</returns>
8085
public static Task<List<Cookie>> VisitAllCookiesAsync(this ICookieManager cookieManager)
8186
{
8287
var cookieVisitor = new TaskCookieVisitor();
@@ -94,10 +99,11 @@ public static Task<List<Cookie>> VisitAllCookiesAsync(this ICookieManager cookie
9499
/// If <paramref name="includeHttpOnly"/> is true, HTTP-only cookies will also be included in the results. The returned cookies
95100
/// are sorted by longest path, then by earliest creation date.
96101
/// </summary>
102+
/// <param name="cookieManager">cookie manager</param>
97103
/// <param name="url">The URL to use for filtering a subset of the cookies available.</param>
98104
/// <param name="includeHttpOnly">A flag that determines whether HTTP-only cookies will be shown in results.</param>
99-
/// <return>A task that represents the VisitUrlCookies operation. The value of the TResult parameter contains a List of cookies.
100-
/// or null if cookies cannot be accessed.</return>
105+
/// <returns>A task that represents the VisitUrlCookies operation. The value of the TResult parameter contains a List of cookies.
106+
/// or null if cookies cannot be accessed.</returns>
101107
public static Task<List<Cookie>> VisitUrlCookiesAsync(this ICookieManager cookieManager, string url, bool includeHttpOnly)
102108
{
103109
var cookieVisitor = new TaskCookieVisitor();

CefSharp/Cookie.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,42 @@ namespace CefSharp
1515
"Creation = {Creation}, Expires = {Expires}, LastAccess = {LastAccess}", Name = "Cookie")]
1616
public sealed class Cookie
1717
{
18+
/// <summary>
19+
/// The cookie name
20+
/// </summary>
1821
public string Name { get; set; }
22+
/// <summary>
23+
/// The cookie value.
24+
/// </summary>
1925
public string Value { get; set; }
26+
/// <summary>
27+
/// If domain is empty a host cookie will be created instead of a domain cookie. Domain cookies are stored with a leading "."
28+
/// and are visible to sub-domains whereas host cookies are not.
29+
/// </summary>
2030
public string Domain { get; set; }
31+
/// <summary>
32+
/// Ss non-empty only URLs at or below the path will get the cookie value.
33+
/// </summary>
2134
public string Path { get; set; }
35+
/// <summary>
36+
/// If true the cookie will only be sent for HTTPS requests.
37+
/// </summary>
2238
public bool Secure { get; set; }
39+
/// <summary>
40+
/// Ss true the cookie will only be sent for HTTP requests.
41+
/// </summary>
2342
public bool HttpOnly { get; set; }
43+
/// <summary>
44+
/// Expires or null of no expiry
45+
/// </summary>
2446
public DateTime? Expires { get; set; }
47+
/// <summary>
48+
/// The cookie creation date. This is automatically populated by the system on cookie creation.
49+
/// </summary>
2550
public DateTime Creation { get; set; }
51+
/// <summary>
52+
/// The cookie last access date. This is automatically populated by the system on access.
53+
/// </summary>
2654
public DateTime LastAccess { get; set; }
2755
}
2856
}

CefSharp/Enums/ContextMenuType.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace CefSharp
88
{
9+
/// <summary>
10+
/// ContextMenuType
11+
/// </summary>
912
[Flags]
1013
public enum ContextMenuType
1114
{

CefSharp/IBrowserHost.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public interface IBrowserHost : IDisposable
6363
void DragTargetDragDrop(MouseEvent mouseEvent);
6464

6565
/// <summary>
66-
/// Call this method when the drag operation started by a <see cref="IRenderWebBrowser.StartDragging"/> call has ended either in a drop or by being cancelled.
66+
/// Call this method when the drag operation started by a <see cref="CefSharp.Internals.IRenderWebBrowser.StartDragging"/> call has ended either in a drop or by being cancelled.
6767
/// If the web view is both the drag source and the drag target then all DragTarget* methods should be called before DragSource* methods.
6868
/// This method is only used when window rendering is disabled.
6969
/// </summary>
@@ -79,7 +79,7 @@ public interface IBrowserHost : IDisposable
7979
void DragTargetDragLeave();
8080

8181
/// <summary>
82-
/// Call this method when the drag operation started by a <see cref="IRenderWebBrowser.StartDragging"/> call has completed.
82+
/// Call this method when the drag operation started by a <see cref="CefSharp.Internals.IRenderWebBrowser.StartDragging"/> call has completed.
8383
/// This method may be called immediately without first calling DragSourceEndedAt to cancel a drag operation.
8484
/// If the web view is both the drag source and the drag target then all DragTarget* methods should be called before DragSource* mthods.
8585
/// This method is only used when window rendering is disabled.

0 commit comments

Comments
 (0)