Skip to content

Commit b59c865

Browse files
committed
Core - Add more factory methods to create instances of managed wrappers
1 parent 9179b37 commit b59c865

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

CefSharp.Core/PublicApi.cs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,74 @@ namespace CefSharp.Core
6767
{
6868
public static class ObjectFactory
6969
{
70+
/// <summary>
71+
/// Create a new instance of <see cref="IBrowserSettings"/>
72+
/// </summary>
73+
/// <param name="autoDispose">Dispose of browser setings after it has been used to create a browser</param>
74+
/// <returns>returns new instance of <see cref="IBrowserSettings"/></returns>
7075
public static IBrowserSettings CreateBrowserSettings(bool autoDispose)
7176
{
7277
return new CefSharp.Core.BrowserSettings(autoDispose);
7378
}
7479

80+
/// <summary>
81+
/// Create a new instance of <see cref="IWindowInfo"/>
82+
/// </summary>
83+
/// <returns>returns new instance of <see cref="IWindowInfo"/></returns>
7584
public static IWindowInfo CreateWindowInfo()
7685
{
7786
return new CefSharp.Core.WindowInfo();
7887
}
88+
89+
/// <summary>
90+
/// Create a new instance of <see cref="IPostData"/>
91+
/// </summary>
92+
/// <returns>returns new instance of <see cref="IPostData"/></returns>
93+
public static IPostData CreatePostData()
94+
{
95+
return new CefSharp.Core.PostData();
96+
}
97+
98+
/// <summary>
99+
/// Create a new instance of <see cref="IPostDataElement"/>
100+
/// </summary>
101+
/// <returns>returns new instance of <see cref="IPostDataElement"/></returns>
102+
public static IPostDataElement CreatePostDataElement()
103+
{
104+
return new CefSharp.Core.PostDataElement();
105+
}
106+
107+
/// <summary>
108+
/// Create a new instance of <see cref="IRequest"/>
109+
/// </summary>
110+
/// <returns>returns new instance of <see cref="IRequest"/></returns>
111+
public static IRequest CreateRequest()
112+
{
113+
return new CefSharp.Core.Request();
114+
}
115+
116+
/// <summary>
117+
/// Create a new instance of <see cref="IUrlRequest"/>
118+
/// </summary>
119+
/// <param name="request">request</param>
120+
/// <param name="urlRequestClient">url request client</param>
121+
/// <returns>returns new instance of <see cref="IUrlRequest"/></returns>
122+
public static IUrlRequest CreateUrlRequest(IRequest request, IUrlRequestClient urlRequestClient)
123+
{
124+
return new CefSharp.Core.UrlRequest(request, urlRequestClient);
125+
}
126+
127+
/// <summary>
128+
/// Create a new instance of <see cref="IUrlRequest"/>
129+
/// </summary>
130+
/// <param name="request">request</param>
131+
/// <param name="urlRequestClient">url request client</param>
132+
/// <param name="requestContext">request context</param>
133+
/// <returns>returns new instance of <see cref="IUrlRequest"/></returns>
134+
public static IUrlRequest CreateUrlRequest(IRequest request, IUrlRequestClient urlRequestClient, IRequestContext requestContext)
135+
{
136+
return new CefSharp.Core.UrlRequest(request, urlRequestClient, requestContext);
137+
}
79138
}
80139
}
81140

0 commit comments

Comments
 (0)