@@ -135,7 +135,7 @@ void ScenarioCookieManagement::GetCookiesHelper(std::wstring uri)
135135
136136 std::wstring result;
137137 UINT cookie_list_size;
138- CHECK_FAILURE(list->get_Size (&cookie_list_size));
138+ CHECK_FAILURE(list->get_Count (&cookie_list_size));
139139
140140 if (cookie_list_size == 0)
141141 {
@@ -189,7 +189,7 @@ void AddOrUpdateCookieCmdExecuted(object target, ExecutedRoutedEventArgs e)
189189async void GetCookiesCmdExecuted(object target, ExecutedRoutedEventArgs e)
190190{
191191 CoreWebView2CookieList cookieList = await webView.CoreWebView2.CookieManager.GetCookiesAsync("https://www.bing.com");
192- for (uint i = 0; i < cookieList.Size ; ++i)
192+ for (uint i = 0; i < cookieList.Count ; ++i)
193193 {
194194 CoreWebView2Cookie cookie = cookieList.GetValueAtIndex(i);
195195 System.Net.Cookie dotNetCookie = CoreWebView2Cookie.CoreWebView2ToDotNetCookie(cookie);
@@ -321,6 +321,9 @@ interface ICoreWebView2CookieManager : IUnknown {
321321 /// equivalent cookies if they exist.
322322 HRESULT AddOrUpdateCookie([in] ICoreWebView2Cookie* cookie);
323323
324+ /// Deletes a cookie whose params matching those of the specified cookie.
325+ HRESULT DeleteCookie([in] ICoreWebView2StagingCookie* cookie);
326+
324327 /// Deletes browser cookies with matching name and uri or domain/path pair.
325328 /// Cookie name is required.
326329 /// If uri is specified, deletes all cookies with the given name where domain
@@ -338,7 +341,7 @@ interface ICoreWebView2CookieManager : IUnknown {
338341[uuid(02F758AF-2F1C-4263-A5F8-37CA875B40D1), object, pointer_default(unique)]
339342interface ICoreWebView2CookieList : IUnknown {
340343 /// The number of cookies contained in the ICoreWebView2CookieList.
341- [propget] HRESULT Size ([out, retval] UINT* size );
344+ [propget] HRESULT Count ([out, retval] UINT* count );
342345
343346 /// Get the cookie object at the given index.
344347 HRESULT GetValueAtIndex([in] UINT index, [out, retval] ICoreWebView2Cookie** cookie);
@@ -404,6 +407,9 @@ namespace Microsoft.Web.WebView2.Core
404407 /// equivalent cookies if they exist.
405408 void AddOrUpdateCookie (CoreWebView2Cookie cookie );
406409
410+ /// Deletes a cookie whose params matching those of the specified cookie.
411+ void DeleteCookie (CoreWebView2Cookie cookie );
412+
407413 /// Deletes browser cookies with matching name and uri or domain/path pair.
408414 /// Cookie name is required.
409415 /// If uri is specified, deletes all cookies with the given name where domain
@@ -421,7 +427,7 @@ namespace Microsoft.Web.WebView2.Core
421427 runtimeclass CoreWebView2CookieList
422428 {
423429 /// The number of cookies contained in the CoreWebView2CookieList.
424- UInt32 Size { get ; };
430+ UInt32 Count { get ; };
425431
426432 /// Get the cookie object at the given index.
427433 CoreWebView2Cookie GetValueAtIndex (UInt32 index );
0 commit comments