| 7 | #include "framework.h" |
| 8 | |
| 9 | class Tab |
| 10 | { |
| 11 | public: |
| 12 | Microsoft::WRL::ComPtr<ICoreWebView2Controller> m_contentController; |
| 13 | Microsoft::WRL::ComPtr<ICoreWebView2> m_contentWebView; |
| 14 | Microsoft::WRL::ComPtr<ICoreWebView2DevToolsProtocolEventReceiver> m_securityStateChangedReceiver; |
| 15 | |
| 16 | static std::unique_ptr<Tab> CreateNewTab(HWND hWnd, ICoreWebView2Environment* env, size_t id, bool shouldBeActive); |
| 17 | HRESULT ResizeWebView(); |
| 18 | protected: |
| 19 | HWND m_parentHWnd = nullptr; |
| 20 | size_t m_tabId = INVALID_TAB_ID; |
| 21 | EventRegistrationToken m_historyUpdateForwarderToken = {}; |
| 22 | EventRegistrationToken m_uriUpdateForwarderToken = {}; |
| 23 | EventRegistrationToken m_navStartingToken = {}; |
| 24 | EventRegistrationToken m_navCompletedToken = {}; |
| 25 | EventRegistrationToken m_securityUpdateToken = {}; |
| 26 | EventRegistrationToken m_messageBrokerToken = {}; // Message broker for browser pages loaded in a tab |
| 27 | Microsoft::WRL::ComPtr<ICoreWebView2WebMessageReceivedEventHandler> m_messageBroker; |
| 28 | |
| 29 | HRESULT Init(ICoreWebView2Environment* env, bool shouldBeActive); |
| 30 | void SetMessageBroker(); |
| 31 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected