Skip to content

Commit 57f7c5f

Browse files
Expanded IDL comment
1 parent 33c17c0 commit 57f7c5f

1 file changed

Lines changed: 19 additions & 15 deletions

File tree

specs/BrowserTaskManager.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ displays the different processes associated with the current browser process and
55
what they're used for. For instance, it could denote that a particular process
66
is a renderer process and would show the different web pages rendered by that
77
process. In a chromium browser it can be opened by the end user by pressing
8-
`Shift+Esc` or from the browser's title bar's context menu's
8+
`Shift+Esc` or from the DevTools window's title bar's context menu entry
9+
`Browser task manager`. For WebView2 applications, we block the
10+
`Shift+Esc` shortcut, but the task manager can still be opened via the
911
`Browser task manager` entry.
1012

1113
At the current time, it is expected that the user will close the Task
@@ -14,35 +16,33 @@ Manager manually, so we do not need to provide an API to close it.
1416
In this document we describe the updated API. We'd appreciate your feedback.
1517

1618
# Description
17-
We propose extending `CoreWebView2` to provide a `ShowTaskManager` method.
19+
We propose extending `CoreWebView2` to provide an `OpenTaskManager` method.
1820
This method will open a new window containing the task manager. If the task
1921
manager is already opened, this method will do nothing.
2022

2123
# Examples
22-
## C++: Show Task Manager
24+
## C++: Open Task Manager
2325

2426
``` cpp
2527
wil::com_ptr<ICoreWebView2_5> m_webview;
2628

2729
// This method could be called from a menu bar item, such as
28-
// [Script -> Show Task Manager].
29-
void ScriptComponent::ShowTaskManager()
30+
// [Script -> Open Task Manager].
31+
void ScriptComponent::OpenTaskManager()
3032
{
31-
CHECK_FAILURE(m_webview->ShowTaskManager());
33+
CHECK_FAILURE(m_webview->OpenTaskManager());
3234
}
33-
34-
3535
```
3636

37-
## C#: Show Task Manager
37+
## C#: Open Task Manager
3838
```c#
3939
private WebView2 m_webview;
4040

4141
// This method could be called from a menu bar item, such as
42-
// [Script -> Show Task Manager].
43-
void ShowTaskManager()
42+
// [Script -> Open Task Manager].
43+
void OpenTaskManager()
4444
{
45-
m_webview.CoreWebView2.ShowTaskManager();
45+
m_webview.CoreWebView2.OpenTaskManager();
4646
}
4747
```
4848

@@ -52,9 +52,13 @@ void ShowTaskManager()
5252
/// This is a continuation of the `ICoreWebView2_4` interface
5353
[uuid(20d02d59-6df2-42dc-bd06-f98a694b1302), object, pointer_default(unique)]
5454
interface ICoreWebView2_5 : ICoreWebView2_4 {
55-
/// Shows the Browser Task Manager view as a new window. Does nothing
55+
/// Opens the Browser Task Manager view as a new window. Does nothing
5656
/// if run when the Browser Task Manager is already open.
57-
HRESULT ShowTaskManager();
57+
/// WebView2 currently blocks the `Shift+Esc` shortcut for opening the
58+
/// task manager. An end user can open the browser task manager manually
59+
/// via the `Browser task manager` entry of the DevTools window's title
60+
/// bar's context menu.
61+
HRESULT OpenTaskManager();
5862
}
5963
```
6064

@@ -70,7 +74,7 @@ namespace Microsoft.Web.WebView2.Core
7074
[interface_name("Microsoft.Web.WebView2.Core.ICoreWebView2_5")]
7175
{
7276
// ICoreWebView2_5 members
73-
void ShowTaskManager();
77+
void OpenTaskManager();
7478
}
7579
}
7680
}

0 commit comments

Comments
 (0)