public BrowserPlugin(CefWebPluginInfo webPluginInfo) { Name = webPluginInfo.Name; Description = webPluginInfo.Description; Path = webPluginInfo.Path; Version = webPluginInfo.Version; }
private int visit(cef_web_plugin_info_visitor_t *self, cef_web_plugin_info_t *info, int count, int total) { CheckSelf(self); var m_info = CefWebPluginInfo.FromNative(info); var result = Visit(m_info, count, total); return(result ? 1 : 0); }
private int on_before_plugin_load(cef_request_handler_t *self, cef_browser_t *browser, cef_string_t *url, cef_string_t *policy_url, cef_web_plugin_info_t *info) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_url = cef_string_t.ToString(url); var m_policy_url = cef_string_t.ToString(policy_url); var m_info = CefWebPluginInfo.FromNative(info); var result = OnBeforePluginLoad(m_browser, m_url, m_policy_url, m_info); return(result ? 1 : 0); }
private int on_before_plugin_load(cef_request_context_handler_t *self, cef_string_t *mime_type, cef_string_t *plugin_url, cef_string_t *top_origin_url, cef_web_plugin_info_t *plugin_info, CefPluginPolicy *plugin_policy) { CheckSelf(self); var m_mime_type = cef_string_t.ToString(mime_type); var m_plugin_url = cef_string_t.ToString(plugin_url); var m_top_origin_url = cef_string_t.ToString(top_origin_url); var m_plugin_info = CefWebPluginInfo.FromNative(plugin_info); var m_plugin_policy = *plugin_policy; var result = OnBeforePluginLoad(m_mime_type, m_plugin_url, m_top_origin_url, m_plugin_info, ref m_plugin_policy); *plugin_policy = m_plugin_policy; return(result ? 1 : 0); }
private int on_before_plugin_load(cef_request_context_handler_t *self, cef_string_t *mime_type, cef_string_t *plugin_url, int is_main_frame, cef_string_t *top_origin_url, cef_web_plugin_info_t *plugin_info, CefPluginPolicy *plugin_policy) { CheckSelf(self); var mMimeType = cef_string_t.ToString(mime_type); var mPluginUrl = cef_string_t.ToString(plugin_url); var mIsMainFrame = is_main_frame != 0; var mTopOriginUrl = cef_string_t.ToString(top_origin_url); var mPluginInfo = CefWebPluginInfo.FromNative(plugin_info); var mPluginPolicy = *plugin_policy; var result = OnBeforePluginLoad(mMimeType, mPluginUrl, mIsMainFrame, mTopOriginUrl, mPluginInfo, ref mPluginPolicy); *plugin_policy = mPluginPolicy; return(result ? 1 : 0); }
/// <summary> /// Called on multiple browser process threads before a plugin instance is /// loaded. |mime_type| is the mime type of the plugin that will be loaded. /// |plugin_url| is the content URL that the plugin will load and may be empty. /// |is_main_frame| will be true if the plugin is being loaded in the main /// (top-level) frame, |top_origin_url| is the URL for the top-level frame that /// contains the plugin when loading a specific plugin instance or empty when /// building the initial list of enabled plugins for 'navigator.plugins' /// JavaScript state. |plugin_info| includes additional information about the /// plugin that will be loaded. |plugin_policy| is the recommended policy. /// Modify |plugin_policy| and return true to change the policy. Return false /// to use the recommended policy. The default plugin policy can be set at /// runtime using the `--plugin-policy=[allow|detect|block]` command-line flag. /// Decisions to mark a plugin as disabled by setting |plugin_policy| to /// PLUGIN_POLICY_DISABLED may be cached when |top_origin_url| is empty. To /// purge the plugin list cache and potentially trigger new calls to this /// method call CefRequestContext::PurgePluginListCache. /// </summary> protected virtual bool OnBeforePluginLoad(string mimeType, string pluginUrl, bool isMainFrame, string topOriginUrl, CefWebPluginInfo pluginInfo, ref CefPluginPolicy pluginPolicy) { return(false); }
/// <summary> /// Called on the browser process IO thread before a plugin is loaded. Return /// true to block loading of the plugin. /// </summary> protected virtual bool OnBeforePluginLoad(CefBrowser browser, string url, string policyUrl, CefWebPluginInfo info) { return(false); }
/// <summary> /// Method that will be called once for each plugin. |count| is the 0-based /// index for the current plugin. |total| is the total number of plugins. /// Return false to stop visiting plugins. This method may never be called if /// no plugins are found. /// </summary> protected abstract bool Visit(CefWebPluginInfo info, int count, int total);
/// <summary> /// Called on the browser process IO thread before a plugin is loaded. Return /// true to block loading of the plugin. /// </summary> protected virtual bool OnBeforePluginLoad(CefBrowser browser, string url, string policyUrl, CefWebPluginInfo info) { return false; }
protected override bool Visit(CefWebPluginInfo pluginInfo, int count, int total) { action.Invoke(pluginInfo); return true; }