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 0007 #pragma once 0008 0009 #include "networkpluginurlinterceptor.h" 0010 #include "networkpluginurlinterceptorinterface.h" 0011 #include "webengineviewer_export.h" 0012 #include <QList> 0013 #include <QObject> 0014 #include <WebEngineViewer/WebHitTestResult> 0015 #include <memory> 0016 class KActionCollection; 0017 class QWebEngineView; 0018 namespace WebEngineViewer 0019 { 0020 class WebHitTestResult; 0021 class NetworkUrlInterceptorManagerPrivate; 0022 /** 0023 * @brief The NetworkUrlInterceptorManager class 0024 * @author Laurent Montel <montel@kde.org> 0025 */ 0026 class WEBENGINEVIEWER_EXPORT NetworkUrlInterceptorManager : public QObject 0027 { 0028 Q_OBJECT 0029 public: 0030 explicit NetworkUrlInterceptorManager(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent = nullptr); 0031 ~NetworkUrlInterceptorManager() override; 0032 0033 [[nodiscard]] QList<NetworkPluginUrlInterceptorInterface *> interfaceList() const; 0034 [[nodiscard]] QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const; 0035 0036 private: 0037 std::unique_ptr<NetworkUrlInterceptorManagerPrivate> const d; 0038 }; 0039 }