MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / WebState

Method WebState

src/ui/web/WebState.cpp:6–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "WebWidget.h"
5
6WebState::WebState(WebWidget *webWidget, BrowserTabWidget *tabWidget) :
7 index(0),
8 isPinned(false),
9 icon(webWidget->getIcon()),
10 iconUrl(webWidget->getIconUrl()),
11 title(webWidget->getTitle()),
12 url(webWidget->url()),
13 pageHistory()
14{
15 if (tabWidget != nullptr)
16 {
17 index = tabWidget->indexOf(webWidget);
18 isPinned = tabWidget->isTabPinned(index);
19
20 if (icon.isNull())
21 icon = tabWidget->tabIcon(index);
22 }
23
24 if (WebHistory *history = webWidget->getHistory())
25 pageHistory = history->save();
26}
27
28WebState::WebState(WebState &&other) noexcept :
29 index(other.index),

Callers

nothing calls this directly

Calls 7

getIconMethod · 0.80
getIconUrlMethod · 0.80
urlMethod · 0.80
getTitleMethod · 0.45
isTabPinnedMethod · 0.45
getHistoryMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected