1 Star 0 Fork 1

lebu9527/WebView2Browser

forked from qmutz/WebView2Browser 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Tab.h 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
Christopher Wang 提交于 2020-04-24 05:32 +08:00 . User/chwan/update api (#12)
// Copyright (C) Microsoft Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "framework.h"
class Tab
{
public:
Microsoft::WRL::ComPtr<ICoreWebView2Controller> m_contentController;
Microsoft::WRL::ComPtr<ICoreWebView2> m_contentWebView;
Microsoft::WRL::ComPtr<ICoreWebView2DevToolsProtocolEventReceiver> m_securityStateChangedReceiver;
static std::unique_ptr<Tab> CreateNewTab(HWND hWnd, ICoreWebView2Environment* env, size_t id, bool shouldBeActive);
HRESULT ResizeWebView();
protected:
HWND m_parentHWnd = nullptr;
size_t m_tabId = INVALID_TAB_ID;
EventRegistrationToken m_historyUpdateForwarderToken = {};
EventRegistrationToken m_uriUpdateForwarderToken = {};
EventRegistrationToken m_navStartingToken = {};
EventRegistrationToken m_navCompletedToken = {};
EventRegistrationToken m_securityUpdateToken = {};
EventRegistrationToken m_messageBrokerToken = {}; // Message broker for browser pages loaded in a tab
Microsoft::WRL::ComPtr<ICoreWebView2WebMessageReceivedEventHandler> m_messageBroker;
HRESULT Init(ICoreWebView2Environment* env, bool shouldBeActive);
void SetMessageBroker();
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lebu2018/WebView2Browser.git
git@gitee.com:lebu2018/WebView2Browser.git
lebu2018
WebView2Browser
WebView2Browser
master

搜索帮助