MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / CreateNewTab

Method CreateNewTab

Tab.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace Microsoft::WRL;
9
10std::unique_ptr<Tab> Tab::CreateNewTab(HWND hWnd, ICoreWebView2Environment* env, size_t id, bool shouldBeActive)
11{
12 std::unique_ptr<Tab> tab = std::make_unique<Tab>();
13
14 tab->m_parentHWnd = hWnd;
15 tab->m_tabId = id;
16 tab->SetMessageBroker();
17 tab->Init(env, shouldBeActive);
18
19 return tab;
20}
21
22HRESULT Tab::Init(ICoreWebView2Environment* env, bool shouldBeActive)
23{

Callers

nothing calls this directly

Calls 2

SetMessageBrokerMethod · 0.80
InitMethod · 0.80

Tested by

no test coverage detected