CefResolveCallback.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  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 for CefRequestContext::ResolveHost.
  10. /// </summary>
  11. public abstract unsafe partial class CefResolveCallback
  12. {
  13. private void on_resolve_completed(cef_resolve_callback_t* self, CefErrorCode result, cef_string_list* resolved_ips)
  14. {
  15. CheckSelf(self);
  16. var mResolvedIps = cef_string_list.ToArray(resolved_ips);
  17. OnResolveCompleted(result, mResolvedIps);
  18. }
  19. /// <summary>
  20. /// Called on the UI thread after the ResolveHost request has completed.
  21. /// |result| will be the result code. |resolved_ips| will be the list of
  22. /// resolved IP addresses or empty if the resolution failed.
  23. /// </summary>
  24. protected abstract void OnResolveCompleted(CefErrorCode result, string[] resolvedIps);
  25. }
  26. }