Skip to content

Commit

Permalink
Rename environment_staging14 to environment_experimental14
Browse files Browse the repository at this point in the history
  • Loading branch information
oggy22 authored Mar 25, 2024
1 parent 1a8b0be commit 7feb1b3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions SampleApps/WebView2APISample/ScenarioFileSystemHandleShare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ ScenarioFileSystemHandleShare::ScenarioFileSystemHandleShare(AppWindow* appWindo
CHECK_FEATURE_RETURN_HRESULT(webview24);
wil::com_ptr<ICoreWebView2Environment> environment =
appWindow->GetWebViewEnvironment();
wil::com_ptr<ICoreWebView2ExperimentalEnvironment14> environment_staging14 =
environment.try_query<ICoreWebView2ExperimentalEnvironment14>();
CHECK_FEATURE_RETURN_HRESULT(environment_staging14);
wil::com_ptr<ICoreWebView2ExperimentalEnvironment14>
environment_experimental14 =
environment.try_query<ICoreWebView2ExperimentalEnvironment14>();
CHECK_FEATURE_RETURN_HRESULT(environment_experimental14);
wil::com_ptr<ICoreWebView2ExperimentalFileSystemHandle> rootHandle;
CHECK_FAILURE(environment_staging14->CreateWebFileSystemDirectoryHandle(
CHECK_FAILURE(environment_experimental14->CreateWebFileSystemDirectoryHandle(
L"C:\\", COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION_READ_ONLY,
&rootHandle));
wil::com_ptr<ICoreWebView2ExperimentalObjectCollection> webObjectCollection;
IUnknown* webObjects[] = {rootHandle.get()};
CHECK_FAILURE(environment_staging14->CreateObjectCollection(
CHECK_FAILURE(environment_experimental14->CreateObjectCollection(
ARRAYSIZE(webObjects), webObjects, &webObjectCollection));
wil::com_ptr<ICoreWebView2ObjectCollectionView> webObjectCollectionView =
webObjectCollection.try_query<ICoreWebView2ObjectCollectionView>();
Expand All @@ -70,4 +71,4 @@ ScenarioFileSystemHandleShare::ScenarioFileSystemHandleShare(AppWindow* appWindo
ScenarioFileSystemHandleShare::~ScenarioFileSystemHandleShare()
{
CHECK_FAILURE(m_webView->remove_WebMessageReceived(m_navigationCompletedToken));
}
}

0 comments on commit 7feb1b3

Please sign in to comment.