aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/IWebViewMediator.hpp
blob: b9af36f078157feb5d611dc73fb098ba24226f88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include "WebViewData.hpp"
#include "widgets/WebView.hpp"

class IWebViewMediator {
public:
  IWebViewMediator() = default;

  virtual bool has_webview(WebViewId webview_id) = 0;
  virtual void open_url(const QUrl &url, OpenType open_type, WebViewId webview_id) = 0;
  virtual void set_html(const QString &html, WebViewId webview_id) = 0;
  virtual void expose_rpc_function(const QString &name, const RpcFunc &action,
                                   WebViewId webview_id) = 0;
};