Partager via


interface ICoreWebView2ProcessExtendedInfo

interface ICoreWebView2ProcessExtendedInfo
  : public IUnknown

Provides process with associated extended information in the ICoreWebView2Environment.

Summary

Members Descriptions
get_AssociatedFrameInfos The collection of associated FrameInfos which are actively running (showing or hiding UI elements) in this renderer process.
get_ProcessInfo The process info of the current process.

Applies to

Product Introduced
WebView2 Win32 1.0.2210.55
WebView2 Win32 Prerelease 1.0.2357

Members

get_AssociatedFrameInfos

The collection of associated FrameInfos which are actively running (showing or hiding UI elements) in this renderer process.

public HRESULT get_AssociatedFrameInfos(ICoreWebView2FrameInfoCollection ** frames)

AssociatedFrameInfos will only be populated when this CoreWebView2ProcessExtendedInfo corresponds to a renderer process. Non-renderer processes will always have an empty AssociatedFrameInfos. The AssociatedFrameInfos may also be empty for renderer processes that have no active frames.

                            std::wstringstream rendererProcess;
                            wil::com_ptr<ICoreWebView2FrameInfoCollection> frameInfoCollection;
                            CHECK_FAILURE(processExtendedInfo->get_AssociatedFrameInfos(
                                &frameInfoCollection));
                            wil::com_ptr<ICoreWebView2FrameInfoCollectionIterator> iterator;
                            CHECK_FAILURE(frameInfoCollection->GetIterator(&iterator));
                            BOOL hasCurrent = FALSE;
                            UINT32 frameInfoCount = 0;
                            while (SUCCEEDED(iterator->get_HasCurrent(&hasCurrent)) &&
                                   hasCurrent)
                            {
                                wil::com_ptr<ICoreWebView2FrameInfo> frameInfo;
                                CHECK_FAILURE(iterator->GetCurrent(&frameInfo));

                                AppendFrameInfo(frameInfo, rendererProcess);

                                BOOL hasNext = FALSE;
                                CHECK_FAILURE(iterator->MoveNext(&hasNext));
                                frameInfoCount++;
                            }
                            rendererProcessInfos
                                << frameInfoCount
                                << L" frameInfo(s) found in Renderer Process ID:" << processId
                                << L"\n"
                                << rendererProcess.str() << std::endl;

get_ProcessInfo

The process info of the current process.

public HRESULT get_ProcessInfo(ICoreWebView2ProcessInfo ** processInfo)