File indexing completed on 2024-06-23 04:53:56

0001 /* ============================================================
0002 * Falkon - Qt web browser
0003 * Copyright (C) 2013-2015  David Rosca <nowrep@gmail.com>
0004 * Copyright (C) 2013-2018 David Rosca <nowrep@gmail.com>
0005 *
0006 * This program is free software: you can redistribute it and/or modify
0007 * it under the terms of the GNU General Public License as published by
0008 * the Free Software Foundation, either version 3 of the License, or
0009 * (at your option) any later version.
0010 *
0011 * This program is distributed in the hope that it will be useful,
0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014 * GNU General Public License for more details.
0015 *
0016 * You should have received a copy of the GNU General Public License
0017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0018 * ============================================================ */
0019 #ifndef HTML5PERMISSIONSNOTIFICATION_H
0020 #define HTML5PERMISSIONSNOTIFICATION_H
0021 
0022 #include <QString>
0023 #include <QPointer>
0024 
0025 #include "animatedwidget.h"
0026 #include "webpage.h"
0027 
0028 namespace Ui
0029 {
0030 class HTML5PermissionsNotification;
0031 }
0032 
0033 class HTML5PermissionsNotification : public AnimatedWidget
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038     explicit HTML5PermissionsNotification(const QUrl &origin, QWebEnginePage* page, const QWebEnginePage::Feature &feature);
0039     ~HTML5PermissionsNotification();
0040 
0041 private Q_SLOTS:
0042     void grantPermissions();
0043     void denyPermissions();
0044 
0045 private:
0046     Ui::HTML5PermissionsNotification* ui;
0047 
0048     QUrl m_origin;
0049     QPointer<QWebEnginePage> m_page;
0050     QWebEnginePage::Feature m_feature;
0051 };
0052 
0053 #endif // HTML5PERMISSIONSNOTIFICATION_H