2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
23 #include "qwebkitplatformplugin.h"
24 #include "WebNotificationPresenter.h"
27 #if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
28 #include <QVideoWidget>
31 class QListWidgetItem;
34 class Popup : public QDialog {
37 Popup(const QWebSelectData& data) : m_data(data) { setModal(true); }
40 void itemClicked(int idx);
43 void onItemSelected(QListWidgetItem* item);
48 const QWebSelectData& m_data;
53 class SingleSelectionPopup : public Popup {
56 SingleSelectionPopup(const QWebSelectData& data);
60 class MultipleSelectionPopup : public Popup {
63 MultipleSelectionPopup(const QWebSelectData& data);
67 class WebPopup : public QWebSelectMethod {
73 virtual void show(const QWebSelectData& data);
78 void itemClicked(int idx);
83 Popup* createPopup(const QWebSelectData& data);
84 Popup* createSingleSelectionPopup(const QWebSelectData& data);
85 Popup* createMultipleSelectionPopup(const QWebSelectData& data);
88 class TouchModifier : public QWebTouchModifier
92 unsigned hitTestPaddingForTouch(const PaddingDirection direction) const {
93 // Use 10 as padding in each direction but Up.
94 if (direction == QWebTouchModifier::Up)
100 #if defined(ENABLE_QT_MULTIMEDIA) && ENABLE_QT_MULTIMEDIA
101 class FullScreenVideoWidget : public QVideoWidget {
104 FullScreenVideoWidget(QMediaPlayer*);
105 virtual ~FullScreenVideoWidget() {}
108 void fullScreenClosed();
112 void keyPressEvent(QKeyEvent*);
115 QMediaPlayer* m_mediaPlayer; // not owned
118 class FullScreenVideoHandler : public QWebFullScreenVideoHandler {
121 FullScreenVideoHandler();
122 virtual ~FullScreenVideoHandler();
123 bool requiresFullScreenForVideoPlayback() const;
126 void enterFullScreen(QMediaPlayer*);
127 void exitFullScreen();
130 FullScreenVideoWidget* m_mediaWidget; // owned
134 class WebPlugin : public QObject, public QWebKitPlatformPlugin
137 Q_INTERFACES(QWebKitPlatformPlugin)
139 virtual bool supportsExtension(Extension extension) const;
140 virtual QObject* createExtension(Extension extension) const;
143 #endif // WEBPLUGIN_H