.clang-format
.clang-tidy
.gitignore
.vimrc
BrowserTab.cpp
BrowserTab.h
BrowserView.cpp
BrowserView.h
CMakeLists.txt
DatabaseManager.cpp
DatabaseManager.h
DownloadBar.cpp
DownloadBar.h
DownloadWidget.cpp
DownloadWidget.h
MainWindow.cpp
MainWindow.h
Makefile
MasterPasswordDialog.cpp
MasterPasswordDialog.h
PasswordHelper.cpp
PasswordHelper.h
README.md
ThemeConfig.h
VaultManager.cpp
VaultManager.h
browser.desktop
browser.qrc
compile_commands.json
main.cpp
BrowserView.h
raw
1#pragma once
2
3#include <functional>
4
5#include <QWebEngineView>
6
7// Specialized view to handle "open in new tab" requests
8class BrowserView : public QWebEngineView {
9 Q_OBJECT
10public:
11 explicit BrowserView(QWidget *parent = nullptr);
12
13 // Callback used when the engine wants to create a new window/tab
14 std::function<QWebEngineView *()> createTabCallback;
15
16protected:
17 QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
18};