CefRequestCallback.cs 872 B

12345678910111213141516171819202122232425262728293031
  1. namespace Xilium.CefGlue
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Runtime.InteropServices;
  7. using Xilium.CefGlue.Interop;
  8. /// <summary>
  9. /// Callback interface used for asynchronous continuation of url requests.
  10. /// </summary>
  11. public sealed unsafe partial class CefRequestCallback
  12. {
  13. /// <summary>
  14. /// Continue the url request. If |allow| is true the request will be continued.
  15. /// Otherwise, the request will be canceled.
  16. /// </summary>
  17. public void Continue(bool allow)
  18. {
  19. cef_request_callback_t.cont(_self, allow ? 1 : 0);
  20. }
  21. /// <summary>
  22. /// Cancel the url request.
  23. /// </summary>
  24. public void Cancel()
  25. {
  26. cef_request_callback_t.cancel(_self);
  27. }
  28. }
  29. }