diff options
Diffstat (limited to 'WebKit/qt/examples/platformplugin/WebPlugin.cpp')
-rw-r--r-- | WebKit/qt/examples/platformplugin/WebPlugin.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/WebKit/qt/examples/platformplugin/WebPlugin.cpp b/WebKit/qt/examples/platformplugin/WebPlugin.cpp index c3efb80..23b938e 100644 --- a/WebKit/qt/examples/platformplugin/WebPlugin.cpp +++ b/WebKit/qt/examples/platformplugin/WebPlugin.cpp @@ -210,15 +210,30 @@ MultipleSelectionPopup::MultipleSelectionPopup(const QWebSelectData& data) bool WebPlugin::supportsExtension(Extension extension) const { - if (extension == MultipleSelections) + switch (extension) { + case MultipleSelections: return true; - if (extension == Notifications) #if ENABLE_NOTIFICATIONS + case Notifications: return true; -#else +#endif + default: return false; + } +} + +QObject* WebPlugin::createExtension(Extension extension) const +{ + switch (extension) { + case MultipleSelections: + return new WebPopup(); +#if ENABLE_NOTIFICATIONS + case Notifications: + return new WebNotificationPresenter(); #endif - return false; + default: + return 0; + } } Q_EXPORT_PLUGIN2(platformplugin, WebPlugin) |