interface ICoreWebView2ExperimentalProcessInfo

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalProcessInfo
  : public IUnknown

This is the ICoreWebView2ExperimentalProcessInfo interface that provides the collection of FrameInfos running in that process.

Summary

Members Descriptions
get_AssociatedFrameInfos The collection of associated FrameInfos which are actively running (showing UI elements) in this renderer process.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.1083

Members

get_AssociatedFrameInfos

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

public HRESULT get_AssociatedFrameInfos(ICoreWebView2FrameInfoCollection ** frames)

AssociatedFrameInfos will only be populated when obtained via calling CoreWebView2Environment.GetProcessInfosWithDetails and when this CoreWebView2ProcessInfo corresponds to a renderer process. CoreWebView2ProcessInfo objects obtained via CoreWebView2Environment .GetProcessInfos or for 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<ICoreWebView2ExperimentalProcessInfo>
                                processInfoExperimental;
                            CHECK_FAILURE(processInfo->QueryInterface(
                                IID_PPV_ARGS(&processInfoExperimental)));
                            wil::com_ptr<ICoreWebView2FrameInfoCollection> frameInfoCollection;
                            CHECK_FAILURE(processInfoExperimental->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
                                << std::to_wstring(frameInfoCount)
                                << L" frameInfo(s) found in Renderer Process ID:"
                                << std::to_wstring(processId) << L"\n"
                                << rendererProcess.str() << std::endl;