| 1 | // Copyright (C) 2015 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QWEBVIEWINTERFACE_H |
| 5 | #define QWEBVIEWINTERFACE_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtWebView/qwebview_global.h> |
| 19 | |
| 20 | #include <QtCore/qobject.h> |
| 21 | #include <QtCore/qurl.h> |
| 22 | #include <QtGui/qimage.h> |
| 23 | #include <QtCore/private/qglobal_p.h> |
| 24 | |
| 25 | |
| 26 | QT_BEGIN_NAMESPACE |
| 27 | |
| 28 | class QJSValue; |
| 29 | |
| 30 | class QWebViewInterface |
| 31 | { |
| 32 | public: |
| 33 | virtual ~QWebViewInterface() {} |
| 34 | virtual QString httpUserAgent() const = 0; |
| 35 | virtual void setHttpUserAgent(const QString &httpUserAgent) = 0; |
| 36 | virtual QUrl url() const = 0; |
| 37 | virtual void setUrl(const QUrl &url) = 0; |
| 38 | virtual bool canGoBack() const = 0; |
| 39 | virtual bool canGoForward() const = 0; |
| 40 | virtual QString title() const = 0; |
| 41 | virtual int loadProgress() const = 0; |
| 42 | virtual bool isLoading() const = 0; |
| 43 | |
| 44 | // Q_SLOTS |
| 45 | virtual void goBack() = 0; |
| 46 | virtual void goForward() = 0; |
| 47 | virtual void stop() = 0; |
| 48 | virtual void reload() = 0; |
| 49 | virtual void loadHtml(const QString &html, const QUrl &baseUrl = QUrl()) = 0; |
| 50 | |
| 51 | virtual void runJavaScriptPrivate(const QString &script, |
| 52 | int callbackId) = 0; |
| 53 | virtual void setCookie(const QString &domain, const QString &name, const QString &value) = 0; |
| 54 | virtual void deleteCookie(const QString &domain, const QString &name) = 0; |
| 55 | virtual void deleteAllCookies() = 0; |
| 56 | }; |
| 57 | |
| 58 | QT_END_NAMESPACE |
| 59 | |
| 60 | #endif // QWEBVIEWINTERFACE_H |
| 61 | |