diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h
index 12d3b68de..7485ca25f 100644
--- a/CefSharp.Core/Cef.h
+++ b/CefSharp.Core/Cef.h
@@ -14,6 +14,7 @@
#include "Internals/CookieVisitor.h"
#include "Internals/CompletionHandler.h"
#include "Internals/StringUtils.h"
+#include "Internals/PluginVisitor.h"
#include "ManagedCefBrowserAdapter.h"
#include "CefSettings.h"
#include "SchemeHandlerWrapper.h"
@@ -454,6 +455,17 @@ namespace CefSharp
return CefClearSchemeHandlerFactories();
}
+ /// Visits all plugins using the provided Plugin Visitor.
+ /// A user-provided Plugin Visitor implementation.
+ static Task^>^ GetPlugins()
+ {
+ CefRefPtr visitor = new PluginVisitor();
+
+ CefVisitWebPluginInfo(visitor);
+
+ return visitor->GetTask();
+ }
+
///
/// Add a plugin path (directory + file). This change may not take affect until after RefreshWebPlugins() is called.
///
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index d0c9ab88e..b055d4f37 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -250,6 +250,7 @@
+
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index a172e2c67..8bba5ac71 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -136,6 +136,9 @@
Header Files
+
+ Header Files
+
diff --git a/CefSharp.Core/Internals/PluginVisitor.h b/CefSharp.Core/Internals/PluginVisitor.h
new file mode 100644
index 000000000..a63263c60
--- /dev/null
+++ b/CefSharp.Core/Internals/PluginVisitor.h
@@ -0,0 +1,58 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#pragma once
+
+using namespace System::Threading::Tasks;
+using namespace CefSharp;
+
+#include "Stdafx.h"
+#include "include/cef_web_plugin.h"
+
+namespace CefSharp
+{
+ private class PluginVisitor : public CefWebPluginInfoVisitor
+ {
+ private:
+ gcroot^>^> _taskCompletionSource;
+ gcroot^> _list;
+
+ public:
+ PluginVisitor()
+ {
+ _list = gcnew List();
+ _taskCompletionSource = gcnew TaskCompletionSource^>();
+ }
+
+ ~PluginVisitor()
+ {
+ _taskCompletionSource = nullptr;
+ }
+
+ Task^>^ GetTask()
+ {
+ return _taskCompletionSource->Task;
+ }
+
+ virtual bool Visit(CefRefPtr info, int count, int total) OVERRIDE
+ {
+ Plugin plugin;
+ plugin.Name = StringUtils::ToClr(info->GetName());
+ plugin.Description = StringUtils::ToClr(info->GetDescription());
+ plugin.Path = StringUtils::ToClr(info->GetPath());
+ plugin.Version = StringUtils::ToClr(info->GetVersion());
+
+ _list->Add(plugin);
+
+ if(count == (total - 1))
+ {
+ _taskCompletionSource->SetResult(_list);
+ }
+
+ return true;
+ }
+
+ IMPLEMENT_REFCOUNTING(PluginVisitor);
+ };
+}
\ No newline at end of file
diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj
index 24eb87832..87c061e96 100644
--- a/CefSharp/CefSharp.csproj
+++ b/CefSharp/CefSharp.csproj
@@ -127,6 +127,7 @@
+
diff --git a/CefSharp/Plugin.cs b/CefSharp/Plugin.cs
new file mode 100644
index 000000000..f7426ae2f
--- /dev/null
+++ b/CefSharp/Plugin.cs
@@ -0,0 +1,14 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+namespace CefSharp
+{
+ public struct Plugin
+ {
+ public string Name { get; set; }
+ public string Description { get; set; }
+ public string Path { get; set; }
+ public string Version { get; set; }
+ }
+}