Skip to content

Commit 0ac43cf

Browse files
committed
Core - Remove Remaining Plugin APIs
- Remove plugin references - Update xml doc comments - Update ref assembly (netcore) - Update examples Issue #4045
1 parent e6d9aba commit 0ac43cf

27 files changed

+9
-411
lines changed

CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace CefSharp
3030

3131
/// <summary>
3232
/// This function should be called from the application entry point function (typically Program.Main)
33-
/// to execute a secondary process e.g. gpu, plugin, renderer, utility
33+
/// to execute a secondary process e.g. gpu, renderer, utility
3434
/// This overload is specifically used for .Net Core. For hosting your own BrowserSubProcess
3535
/// it's preferable to use the Main method provided by this class.
3636
/// - Obtains the command line args via a call to Environment::GetCommandLineArgs
@@ -49,7 +49,7 @@ namespace CefSharp
4949

5050
/// <summary>
5151
/// This function should be called from the application entry point function (typically Program.Main)
52-
/// to execute a secondary process e.g. gpu, plugin, renderer, utility
52+
/// to execute a secondary process e.g. gpu, renderer, utility
5353
/// This overload is specifically used for .Net Core. For hosting your own BrowserSubProcess
5454
/// it's preferable to use the Main method provided by this class.
5555
/// - Obtains the command line args via a call to Environment::GetCommandLineArgs
@@ -72,7 +72,7 @@ namespace CefSharp
7272

7373
/// <summary>
7474
/// This function should be called from the application entry point function (typically Program.Main)
75-
/// to execute a secondary process e.g. gpu, plugin, renderer, utility
75+
/// to execute a secondary process e.g. gpu, renderer, utility
7676
/// It can be used to run secondary processes (BrowserSubProcess) from your main applications executable
7777
/// or from a separate executable specified by the CefSettings.BrowserSubprocessPath value.
7878
/// CefSharp defaults to using the latter approach, a default implementation (CefSharp.BrowserSubProcess.exe) is
@@ -91,7 +91,7 @@ namespace CefSharp
9191

9292
/// <summary>
9393
/// This function should be called from the application entry point function (typically Program.Main)
94-
/// to execute a secondary process e.g. gpu, plugin, renderer, utility
94+
/// to execute a secondary process e.g. gpu, renderer, utility
9595
/// It can be used to run secondary processes (BrowserSubProcess) from your main applications executable
9696
/// or from a separate executable specified by the CefSettings.BrowserSubprocessPath value.
9797
/// CefSharp defaults to using the latter approach, a default implementation (CefSharp.BrowserSubProcess.exe) is

CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public BrowserSettings(bool autoDispose) { }
3434
public virtual CefSharp.CefState LocalStorage { get { throw null; } set { } }
3535
public virtual int MinimumFontSize { get { throw null; } set { } }
3636
public virtual int MinimumLogicalFontSize { get { throw null; } set { } }
37-
public virtual CefSharp.CefState Plugins { get { throw null; } set { } }
3837
public virtual CefSharp.CefState RemoteFonts { get { throw null; } set { } }
3938
public virtual string SansSerifFontFamily { get { throw null; } set { } }
4039
public virtual string SerifFontFamily { get { throw null; } set { } }
@@ -77,23 +76,19 @@ public static void EnableWaitForBrowsersToClose() { }
7776
public static CefSharp.IRequestContext GetGlobalRequestContext() { throw null; }
7877
public static string GetMimeType(string extension) { throw null; }
7978
public static int GetMinLogLevel() { throw null; }
80-
public static System.Threading.Tasks.Task<System.Collections.Generic.List<CefSharp.WebPluginInfo>> GetPlugins() { throw null; }
8179
public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings) { throw null; }
8280
public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck) { throw null; }
8381
public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck, CefSharp.IApp cefApp) { throw null; }
8482
public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck, CefSharp.IBrowserProcessHandler browserProcessHandler) { throw null; }
8583
public static CefSharp.UrlParts ParseUrl(string url) { throw null; }
8684
public static void PreShutdown() { }
8785
public static void QuitMessageLoop() { }
88-
public static void RefreshWebPlugins() { }
8986
public static bool RemoveCrossOriginWhitelistEntry(string sourceOrigin, string targetProtocol, string targetDomain, bool allowTargetSubdomains) { throw null; }
9087
public static void RemoveDisposable(System.IDisposable item) { }
9188
public static void RunMessageLoop() { }
9289
public static void SetCrashKeyValue(string key, string value) { }
9390
public static void Shutdown() { }
9491
public static void ShutdownWithoutChecks() { }
95-
public static void UnregisterInternalWebPlugin(string path) { }
96-
public static void VisitWebPluginInfo(CefSharp.IWebPluginInfoVisitor visitor) { }
9792
public static void WaitForBrowsersToClose() { }
9893
}
9994
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]

CefSharp.Core.Runtime/BrowserSettings.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,6 @@ namespace CefSharp
227227
void set(CefState value) { _browserSettings->javascript_dom_paste = (cef_state_t)value; }
228228
}
229229

230-
/// <summary>
231-
/// Controls whether any plugins will be loaded. Also configurable using the
232-
/// "disable-plugins" command-line switch.
233-
/// </summary>
234-
virtual property CefState Plugins
235-
{
236-
CefState get() { return (CefState)_browserSettings->plugins; }
237-
void set(CefState value) { _browserSettings->plugins = (cef_state_t)value; }
238-
}
239-
240230
/// <summary>
241231
/// Controls whether image URLs will be loaded from the network. A cached image
242232
/// will still be rendered if requested. Also configurable using the

CefSharp.Core.Runtime/Cef.h

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
#include <msclr/marshal.h>
1414
#include <include/cef_version.h>
1515
#include <include/cef_origin_whitelist.h>
16-
#include <include/cef_web_plugin.h>
1716
#include <include/cef_crash_util.h>
1817
#include <include/cef_parser.h>
1918
#include <include/internal/cef_types.h>
2019

2120
#include "Internals/CefSharpApp.h"
22-
#include "Internals/CefWebPluginInfoVisitorAdapter.h"
2321
#include "Internals/CefTaskScheduler.h"
2422
#include "CookieManager.h"
2523
#include "CefSettingsBase.h"
@@ -637,46 +635,6 @@ namespace CefSharp
637635
return CefClearSchemeHandlerFactories();
638636
}
639637

640-
/// <summary>
641-
/// Visit web plugin information. Can be called on any thread in the browser process.
642-
/// </summary>
643-
static void VisitWebPluginInfo(IWebPluginInfoVisitor^ visitor)
644-
{
645-
CefVisitWebPluginInfo(new CefWebPluginInfoVisitorAdapter(visitor));
646-
}
647-
648-
/// <summary>
649-
/// Async returns a list containing Plugin Information
650-
/// (Wrapper around CefVisitWebPluginInfo)
651-
/// </summary>
652-
/// <returns>Returns List of <see cref="WebPluginInfo"/> structs.</returns>
653-
static Task<List<WebPluginInfo^>^>^ GetPlugins()
654-
{
655-
auto taskVisitor = gcnew TaskWebPluginInfoVisitor();
656-
CefRefPtr<CefWebPluginInfoVisitorAdapter> visitor = new CefWebPluginInfoVisitorAdapter(taskVisitor);
657-
658-
CefVisitWebPluginInfo(visitor);
659-
660-
return taskVisitor->Task;
661-
}
662-
663-
/// <summary>
664-
/// Cause the plugin list to refresh the next time it is accessed regardless of whether it has already been loaded.
665-
/// </summary>
666-
static void RefreshWebPlugins()
667-
{
668-
CefRefreshWebPlugins();
669-
}
670-
671-
/// <summary>
672-
/// Unregister an internal plugin. This may be undone the next time RefreshWebPlugins() is called.
673-
/// </summary>
674-
/// <param name="path">Path (directory + file).</param>
675-
static void UnregisterInternalWebPlugin(String^ path)
676-
{
677-
CefUnregisterInternalWebPlugin(StringUtils::ToNative(path));
678-
}
679-
680638
/// <summary>
681639
/// Call during process startup to enable High-DPI support on Windows 7 or newer.
682640
/// Older versions of Windows should be left DPI-unaware because they do not

CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@
323323
<ClInclude Include="Internals\JavascriptCallbackFactory.h" />
324324
<ClInclude Include="Internals\MCefRefPtr.h" />
325325
<ClInclude Include="Internals\Messaging\Messages.h" />
326-
<ClInclude Include="Internals\CefWebPluginInfoVisitorAdapter.h" />
327326
<ClInclude Include="Internals\RenderClientAdapter.h" />
328327
<ClInclude Include="Internals\ReportUnhandledExceptions.h" />
329328
<ClInclude Include="Internals\CefRequestCallbackWrapper.h" />

CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,6 @@
310310
<ClInclude Include="Internals\CefSchemeHandlerFactoryAdapter.h">
311311
<Filter>Header Files</Filter>
312312
</ClInclude>
313-
<ClInclude Include="Internals\CefWebPluginInfoVisitorAdapter.h">
314-
<Filter>Header Files</Filter>
315-
</ClInclude>
316313
<ClInclude Include="Internals\CefResourceHandlerAdapter.h">
317314
<Filter>Header Files</Filter>
318315
</ClInclude>

CefSharp.Core.Runtime/Internals/CefWebPluginInfoVisitorAdapter.h

Lines changed: 0 additions & 44 deletions
This file was deleted.

CefSharp.Core.Runtime/Internals/ClientAdapter.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -666,18 +666,6 @@ namespace CefSharp
666666
return handler->OnQuotaRequest(_browserControl, browserWrapper, StringUtils::ToClr(originUrl), newSize, requestCallback);
667667
}
668668

669-
void ClientAdapter::OnPluginCrashed(CefRefPtr<CefBrowser> browser, const CefString& plugin_path)
670-
{
671-
auto handler = _browserControl->RequestHandler;
672-
673-
if (handler != nullptr)
674-
{
675-
auto browserWrapper = GetBrowserWrapper(browser->GetIdentifier(), browser->IsPopup());
676-
677-
handler->OnPluginCrashed(_browserControl, browserWrapper, StringUtils::ToClr(plugin_path));
678-
}
679-
}
680-
681669
void ClientAdapter::OnRenderViewReady(CefRefPtr<CefBrowser> browser)
682670
{
683671
auto handler = _browserControl->RequestHandler;

CefSharp.Core.Runtime/Internals/ClientAdapter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ namespace CefSharp
132132
virtual DECL bool OnCertificateError(CefRefPtr<CefBrowser> browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info, CefRefPtr<CefCallback> callback) override;
133133
virtual DECL bool OnSelectClientCertificate(CefRefPtr<CefBrowser> browser, bool isProxy, const CefString& host, int port,
134134
const CefRequestHandler::X509CertificateList& certificates, CefRefPtr<CefSelectClientCertificateCallback> callback) override;
135-
virtual DECL void OnPluginCrashed(CefRefPtr<CefBrowser> browser, const CefString& plugin_path) override;
136135
virtual DECL void OnRenderViewReady(CefRefPtr<CefBrowser> browser) override;
137136
virtual DECL void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser, TerminationStatus status) override;
138137
virtual DECL void OnDocumentAvailableInMainFrame(CefRefPtr<CefBrowser> browser) override;

CefSharp.Core.Runtime/Internals/TypeConversion.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "include/internal/cef_ptr.h"
1010
#include "include\cef_download_item.h"
1111
#include "include\cef_response.h"
12-
#include "include\cef_web_plugin.h"
1312

1413
#include "Serialization\ObjectsSerialization.h"
1514
#include "Serialization\V8Serialization.h"
@@ -88,14 +87,6 @@ namespace CefSharp
8887
return Nullable<DateTime>(DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(epoch).ToLocalTime());
8988
}
9089

91-
static WebPluginInfo^ FromNative(CefRefPtr<CefWebPluginInfo> webPluginInfo)
92-
{
93-
return gcnew WebPluginInfo(StringUtils::ToClr(webPluginInfo->GetName()),
94-
StringUtils::ToClr(webPluginInfo->GetDescription()),
95-
StringUtils::ToClr(webPluginInfo->GetPath()),
96-
StringUtils::ToClr(webPluginInfo->GetVersion()));
97-
}
98-
9990
static IList<DraggableRegion>^ FromNative(const std::vector<CefDraggableRegion>& regions)
10091
{
10192
if (regions.size() == 0)

0 commit comments

Comments
 (0)