File indexing completed on 2025-01-26 04:57:24

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include "webengineviewer_export.h"
0009 #include <QObject>
0010 class QWebEngineUrlRequestInfo;
0011 class KActionCollection;
0012 class QAction;
0013 namespace WebEngineViewer
0014 {
0015 class WebHitTestResult;
0016 /**
0017  * @brief The NetworkPluginUrlInterceptorInterface class
0018  * @author Laurent Montel <montel@kde.org>
0019  */
0020 class WEBENGINEVIEWER_EXPORT NetworkPluginUrlInterceptorInterface : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit NetworkPluginUrlInterceptorInterface(QObject *parent = nullptr);
0025     ~NetworkPluginUrlInterceptorInterface() override;
0026 
0027     virtual void createActions(KActionCollection *ac);
0028     virtual QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
0029 
0030     virtual bool interceptRequest(QWebEngineUrlRequestInfo &info) = 0;
0031 };
0032 }