mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 20:19:41 +00:00
Start renaming of IRequestResponse and RequestResponse class
This commit is contained in:
@@ -254,8 +254,8 @@ namespace CefSharp
|
||||
return false;
|
||||
}
|
||||
|
||||
CefRequestWrapper^ requestWrapper = gcnew CefRequestWrapper(request);
|
||||
RequestResponse^ response = gcnew RequestResponse();
|
||||
auto requestWrapper = gcnew CefRequestWrapper(request);
|
||||
auto response = gcnew Response();
|
||||
|
||||
bool ret = handler->OnBeforeResourceLoad(_browserControl, requestWrapper, response);
|
||||
|
||||
|
||||
@@ -9,23 +9,23 @@ namespace CefSharp
|
||||
{
|
||||
namespace Internals
|
||||
{
|
||||
void RequestResponse::Cancel()
|
||||
void Response::Cancel()
|
||||
{
|
||||
_action = ResponseAction::Cancel;
|
||||
}
|
||||
|
||||
void RequestResponse::Redirect(String^ url)
|
||||
void Response::Redirect(String^ url)
|
||||
{
|
||||
_redirectUrl = url;
|
||||
_action = ResponseAction::Redirect;
|
||||
}
|
||||
|
||||
void RequestResponse::RespondWith(Stream^ stream, String^ mimeType)
|
||||
void Response::RespondWith(Stream^ stream, String^ mimeType)
|
||||
{
|
||||
RespondWith(stream, mimeType, "OK", 200, nullptr);
|
||||
}
|
||||
|
||||
void RequestResponse::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
|
||||
void Response::RespondWith(Stream^ stream, String^ mimeType, String^ statusText, int statusCode, NameValueCollection^ responseHeaders)
|
||||
{
|
||||
if (String::IsNullOrEmpty(mimeType))
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CefSharp
|
||||
Respond
|
||||
};
|
||||
|
||||
private ref class RequestResponse : IRequestResponse
|
||||
private ref class Response : IResponse
|
||||
{
|
||||
IRequest^ _request;
|
||||
Stream^ _responseStream;
|
||||
@@ -34,7 +34,7 @@ namespace CefSharp
|
||||
NameValueCollection^ _responseHeaders;
|
||||
|
||||
internal:
|
||||
RequestResponse() : _action(ResponseAction::Continue)
|
||||
Response() : _action(ResponseAction::Continue)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CefSharp.Example
|
||||
// TODO: Add your own code here for handling scenarios where a plugin crashed, for one reason or another.
|
||||
}
|
||||
|
||||
bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IRequestResponse response)
|
||||
bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response)
|
||||
{
|
||||
if (request.Url.StartsWith(ResourceUrl.ToString()))
|
||||
{
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<Compile Include="IWebPluginInfo.cs" />
|
||||
<Compile Include="IRequest.cs" />
|
||||
<Compile Include="IRequestHandler.cs" />
|
||||
<Compile Include="IRequestResponse.cs" />
|
||||
<Compile Include="IResponse.cs" />
|
||||
<Compile Include="ISchemeHandler.cs" />
|
||||
<Compile Include="ISchemeHandlerFactory.cs" />
|
||||
<Compile Include="ISchemeHandlerResponse.cs" />
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CefSharp
|
||||
/// <param name="request">the request object - can be modified in this callback.</param>
|
||||
/// <param name="response">the request object - can be modified in this callback.</param>
|
||||
/// <returns>To cancel loading of the resource return true or false o allow the resource to load normally.</returns>
|
||||
bool OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IRequestResponse response);
|
||||
bool OnBeforeResourceLoad(IWebBrowser browser, IRequest request, IResponse response);
|
||||
|
||||
// TODO: Investigate how we can support in CEF3.
|
||||
//void OnResourceResponse(IWebBrowser browser, string url, int status, string statusText, string mimeType, WebHeaderCollection headers);
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.IO;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
public interface IRequestResponse
|
||||
public interface IResponse
|
||||
{
|
||||
/// cancel the request, return nothing
|
||||
void Cancel();
|
||||
Reference in New Issue
Block a user