interface ICoreWebView2_13
interface ICoreWebView2_13
: public ICoreWebView2_12
This interface is an extension of ICoreWebView2_12 that supports Profile API.
Summary
Members | Descriptions |
---|---|
get_Profile | The associated ICoreWebView2Profile object. |
Applies to
Product | Introduced |
---|---|
WebView2 Win32 | 1.0.1210.39 |
WebView2 Win32 Prerelease | 1.0.1248 |
Members
get_Profile
The associated ICoreWebView2Profile object.
public HRESULT get_Profile(ICoreWebView2Profile ** value)
If this CoreWebView2 was created with a CoreWebView2ControllerOptions, the CoreWebView2Profile will match those specified options. Otherwise if this CoreWebView2 was created without a CoreWebView2ControllerOptions, then this will be the default CoreWebView2Profile for the corresponding CoreWebView2Environment.
auto webView2_13 = coreWebView2.try_query<ICoreWebView2_13>();
if (webView2_13)
{
wil::com_ptr<ICoreWebView2Profile> profile;
CHECK_FAILURE(webView2_13->get_Profile(&profile));
wil::unique_cotaskmem_string profile_name;
CHECK_FAILURE(profile->get_ProfileName(&profile_name));
m_profileName = profile_name.get();
BOOL inPrivate = FALSE;
CHECK_FAILURE(profile->get_IsInPrivateModeEnabled(&inPrivate));
if (!m_webviewOption.downloadPath.empty())
{
CHECK_FAILURE(profile->put_DefaultDownloadFolderPath(
m_webviewOption.downloadPath.c_str()));
}
// update window title with m_profileName
UpdateAppTitle();
// update window icon
SetAppIcon(inPrivate);
}
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기