summaryrefslogtreecommitdiff
path: root/plugins/WebView/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 14:29:31 +0300
commita905c9c3f92fd54f37a5466649ac378db69e7cb0 (patch)
tree87a60dadfbf9fd8d916ea9100c26b6e314293242 /plugins/WebView/src
parentd75fed3bfc9c252f5d20b889e0bec95fb0a4527e (diff)
all protocols rewritten to CMPluginBase
Diffstat (limited to 'plugins/WebView/src')
-rw-r--r--plugins/WebView/src/main.cpp19
-rw-r--r--plugins/WebView/src/stdafx.h1
2 files changed, 13 insertions, 7 deletions
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index c69558c13f..712dc64f0c 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -152,13 +152,6 @@ extern "C" int __declspec(dllexport) Load()
nlu.szDescriptiveName.a = tempNdesc;
hNetlibUser = Netlib_RegisterUser(&nlu);
- // register webview protocol
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = MODULENAME;
- pd.type = PROTOTYPE_PROTOCOL;
- Proto_RegisterModule(&pd);
-
//protocol services
InitServices();
@@ -290,3 +283,15 @@ extern "C" int __declspec(dllexport) Load()
db_set_b(NULL, MODULENAME, HAS_CRASHED_KEY, 1);
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+struct CMPlugin : public CMPluginBase
+{
+ CMPlugin() :
+ CMPluginBase(MODULENAME)
+ {
+ RegisterProtocol(PROTOTYPE_PROTOCOL);
+ }
+}
+ g_plugin;
diff --git a/plugins/WebView/src/stdafx.h b/plugins/WebView/src/stdafx.h
index 3ce8c77b06..64808dddad 100644
--- a/plugins/WebView/src/stdafx.h
+++ b/plugins/WebView/src/stdafx.h
@@ -31,6 +31,7 @@
#include <m_netlib.h>
#include <m_langpack.h>
#include <m_findadd.h>
+#include <m_plugin.h>
#include "resource.h"
#include "version.h"