mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-21 00:38:14 +00:00
util: Add URL Request Interceptor for QWebEngine
This commit is contained in:
parent
790a9e47eb
commit
71b0d923e2
3 changed files with 64 additions and 0 deletions
30
src/yuzu/util/url_request_interceptor.h
Normal file
30
src/yuzu/util/url_request_interceptor.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2020 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
|
||||
#include <QObject>
|
||||
#include <QWebEngineUrlRequestInterceptor>
|
||||
|
||||
class UrlRequestInterceptor : public QWebEngineUrlRequestInterceptor {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UrlRequestInterceptor(QObject* p = nullptr);
|
||||
~UrlRequestInterceptor() override;
|
||||
|
||||
void interceptRequest(QWebEngineUrlRequestInfo& info) override;
|
||||
|
||||
QUrl GetRequestedURL() const;
|
||||
|
||||
signals:
|
||||
void FrameChanged();
|
||||
|
||||
private:
|
||||
QUrl requested_url;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue