Messagelib

interceptormanager.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "webengineviewer/networkpluginurlinterceptor.h"
10#include "webengineviewer_export.h"
11#include <memory>
13class QWebEngineView;
14class QAction;
15namespace WebEngineViewer
16{
17class WebHitTestResult;
18class NetworkPluginUrlInterceptorInterface;
19class NetworkAccessManagerWebEnginePrivate;
20/**
21 * @brief The InterceptorManager class
22 * @author Laurent Montel <montel@kde.org>
23 */
24class WEBENGINEVIEWER_EXPORT InterceptorManager : public QObject
25{
26 Q_OBJECT
27public:
28 explicit InterceptorManager(QWebEngineView *webEngine, KActionCollection *ac, QObject *parent = nullptr);
29 ~InterceptorManager() override;
30 void addInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
31 [[nodiscard]] QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
32 void removeInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
33
34private:
35 std::unique_ptr<NetworkAccessManagerWebEnginePrivate> const d;
36};
37}
The InterceptorManager class.
The WebHitTestResult class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:49:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.