Changeset 68128 in webkit
- Timestamp:
- Sep 23, 2010 3:53:58 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebkitplatformplugin.h
r67272 r68128 111 111 112 112 virtual bool supportsExtension(Extension extension) const = 0; 113 virtual QWebSelectMethod* createSelectInputMethod() const = 0; 114 virtual QWebNotificationPresenter* createNotificationPresenter() const = 0; 115 virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0; 116 113 virtual QObject* createExtension(Extension extension) const = 0; 117 114 }; 118 115 119 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1. 4");116 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5"); 120 117 121 118 #endif // QWEBKITPLATFORMPLUGIN_H -
trunk/WebKit/qt/ChangeLog
r68099 r68128 1 2010-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] Refactor QtWebKitPlatformPlugin interface 6 7 Make it easier to keep source-compability for the 8 QtWebKitPlatformPlugin interface, and run qmake 9 on the example (but not build) for convenience. 10 11 https://bugs.webkit.org/show_bug.cgi?id=46345 12 13 * Api/qwebkitplatformplugin.h: 14 * WebCoreSupport/QtPlatformPlugin.cpp: 15 * examples/platformplugin/README: 16 * examples/platformplugin/WebPlugin.cpp: 17 * examples/platformplugin/WebPlugin.h: 18 * examples/platformplugin/qwebkitplatformplugin.h: 19 1 20 2010-09-22 Andras Becsi <abecsi@webkit.org> 2 21 -
trunk/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
r64829 r68128 92 92 { 93 93 QWebKitPlatformPlugin* p = plugin(); 94 return p ? p->createSelectInputMethod() : 0;94 return p ? qobject_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0; 95 95 } 96 96 … … 99 99 { 100 100 QWebKitPlatformPlugin* p = plugin(); 101 if (!p) 102 return 0; 103 return p->createNotificationPresenter(); 101 return p ? qobject_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0; 104 102 } 105 103 -
trunk/WebKit/qt/examples/platformplugin/README
r60285 r68128 7 7 put the plugin into use. To stop using the plugin just remove the directory $$[QT_INSTALL_PLUGINS]/webkit. 8 8 9 A copy of qwebkitplatformplugin.h is provided with the example, as platform plugins should not depend 10 on the precense of QtWebKit to build. 11 9 12 This plugin can provide popups for <select multiple> elements but to use this feature QtWebKit must be 10 13 compiled with NO_LISTBOX_RENDERING enabled. -
trunk/WebKit/qt/examples/platformplugin/WebPlugin.cpp
r61487 r68128 211 211 bool WebPlugin::supportsExtension(Extension extension) const 212 212 { 213 if (extension == MultipleSelections) 213 switch (extension) { 214 case MultipleSelections: 214 215 return true; 215 if (extension == Notifications)216 216 #if ENABLE_NOTIFICATIONS 217 case Notifications: 217 218 return true; 218 #else 219 #endif 220 default: 219 221 return false; 222 } 223 } 224 225 QObject* WebPlugin::createExtension(Extension extension) const 226 { 227 switch (extension) { 228 case MultipleSelections: 229 return new WebPopup(); 230 #if ENABLE_NOTIFICATIONS 231 case Notifications: 232 return new WebNotificationPresenter(); 220 233 #endif 221 return false; 234 default: 235 return 0; 236 } 222 237 } 223 238 -
trunk/WebKit/qt/examples/platformplugin/WebPlugin.h
r64557 r68128 88 88 Q_INTERFACES(QWebKitPlatformPlugin) 89 89 public: 90 virtual QWebSelectMethod* createSelectInputMethod() const { return new WebPopup(); }91 90 virtual bool supportsExtension(Extension extension) const; 92 virtual QWebNotificationPresenter* createNotificationPresenter() const { 93 return new WebNotificationPresenter(); 94 } 95 virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const { 96 return 0; 97 } 91 virtual QObject* createExtension(Extension extension) const; 98 92 }; 99 93 -
trunk/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
r67272 r68128 111 111 112 112 virtual bool supportsExtension(Extension extension) const = 0; 113 virtual QWebSelectMethod* createSelectInputMethod() const = 0; 114 virtual QWebNotificationPresenter* createNotificationPresenter() const = 0; 115 virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0; 116 113 virtual QObject* createExtension(Extension extension) const = 0; 117 114 }; 118 115 119 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1. 4");116 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.5"); 120 117 121 118 #endif // QWEBKITPLATFORMPLUGIN_H -
trunk/WebKitTools/ChangeLog
r68125 r68128 1 2010-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 Reviewed by Simon Hausmann. 4 5 [Qt] Refactor QtWebKitPlatformPlugin interface 6 7 Make it easier to keep source-compability for the 8 QtWebKitPlatformPlugin interface, and run qmake 9 on the example (but not build) for convenience. 10 11 https://bugs.webkit.org/show_bug.cgi?id=46345 12 13 * Scripts/webkitdirs.pm: 14 1 15 2010-09-23 Adam Barth <abarth@webkit.org> 2 16 -
trunk/WebKitTools/Scripts/webkitdirs.pm
r67911 r68128 1547 1547 } 1548 1548 1549 push @buildArgs, sourceDir() . "/WebKit.pro";1550 1549 if ($config =~ m/debug/i) { 1551 1550 push @buildArgs, "CONFIG-=release"; … … 1562 1561 } 1563 1562 1563 push @buildArgs, sourceDir() . "/WebKit.pro"; 1564 1564 1565 print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n"; 1565 1566 print "Installation headers directory: $installHeaders\n" if(defined($installHeaders)); … … 1570 1571 die "Failed to setup build environment using $qmakebin!\n"; 1571 1572 } 1573 1574 # Manually create makefiles for the examples so we don't build by default 1575 my $examplesDir = $dir . "/WebKit/qt/examples"; 1576 File::Path::mkpath($examplesDir); 1577 $buildArgs[-1] = sourceDir() . "/WebKit/qt/examples/examples.pro"; 1578 chdir $examplesDir or die; 1579 print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n"; 1580 $result = system "$qmakebin @buildArgs"; 1581 die "Failed to create makefiles for the examples!\n" if $result ne 0; 1582 chdir $dir or die; 1572 1583 1573 1584 if ($clean) {
Note: See TracChangeset
for help on using the changeset viewer.