Skip to content

Commit c81513f

Browse files
committed
Updated to match the new ISchemeHandler definition.
1 parent 517c11f commit c81513f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CefSharp.Example/SchemeHandler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public SchemeHandler()
2929
};
3030
}
3131

32-
public bool ProcessRequest(IRequest request, ref string mimeType, ref Stream stream)
32+
public bool ProcessRequestAsync(IRequest request, SchemeHandlerResponse response, OnRequestCompletedHandler requestCompletedCallback)
3333
{
3434
var uri = new Uri(request.Url);
3535
var segments = uri.Segments;
@@ -40,8 +40,9 @@ public bool ProcessRequest(IRequest request, ref string mimeType, ref Stream str
4040
!String.IsNullOrEmpty(resource))
4141
{
4242
var bytes = Encoding.UTF8.GetBytes(resource);
43-
stream = new MemoryStream(bytes);
44-
mimeType = "text/html";
43+
response.ResponseStream = new MemoryStream(bytes);
44+
response.MimeType = "text/html";
45+
requestCompletedCallback();
4546

4647
return true;
4748
}

0 commit comments

Comments
 (0)