CefWebPluginUnstableCallback.cs 1.0 KB

123456789101112131415161718192021222324252627282930
  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. /// Interface to implement for receiving unstable plugin information. The methods
  10. /// of this class will be called on the browser process IO thread.
  11. /// </summary>
  12. public abstract unsafe partial class CefWebPluginUnstableCallback
  13. {
  14. private void is_unstable(cef_web_plugin_unstable_callback_t* self, cef_string_t* path, int unstable)
  15. {
  16. CheckSelf(self);
  17. var m_path = cef_string_t.ToString(path);
  18. IsUnstable(m_path, unstable != 0);
  19. }
  20. /// <summary>
  21. /// Method that will be called for the requested plugin. |unstable| will be
  22. /// true if the plugin has reached the crash count threshold of 3 times in 120
  23. /// seconds.
  24. /// </summary>
  25. protected abstract void IsUnstable(string path, bool unstable);
  26. }
  27. }