Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7e4ccf16
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7e4ccf16
编写于
8月 26, 2020
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename WebviewPanelHandle -> WebviewHandle
上级
79d7a956
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
52 addition
and
52 deletion
+52
-52
src/vs/workbench/api/browser/mainThreadWebviewPanelsAndViews.ts
.../workbench/api/browser/mainThreadWebviewPanelsAndViews.ts
+8
-8
src/vs/workbench/api/browser/mainThreadWebviewViews.ts
src/vs/workbench/api/browser/mainThreadWebviewViews.ts
+1
-1
src/vs/workbench/api/browser/mainThreadWebviews.ts
src/vs/workbench/api/browser/mainThreadWebviews.ts
+7
-7
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+19
-19
src/vs/workbench/api/common/extHostCustomEditors.ts
src/vs/workbench/api/common/extHostCustomEditors.ts
+1
-1
src/vs/workbench/api/common/extHostWebview.ts
src/vs/workbench/api/common/extHostWebview.ts
+13
-13
src/vs/workbench/api/common/extHostWebviewView.ts
src/vs/workbench/api/common/extHostWebviewView.ts
+3
-3
未找到文件。
src/vs/workbench/api/browser/mainThreadWebviewPanelsAndViews.ts
浏览文件 @
7e4ccf16
...
...
@@ -158,7 +158,7 @@ export class MainThreadWebviewPanelsAndViews extends Disposable implements extHo
public
get
webviewInputs
():
Iterable
<
WebviewInput
>
{
return
this
.
_webviewInputs
;
}
public
addWebviewInput
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
input
:
WebviewInput
):
void
{
public
addWebviewInput
(
handle
:
extHostProtocol
.
WebviewHandle
,
input
:
WebviewInput
):
void
{
this
.
_webviewInputs
.
add
(
handle
,
input
);
this
.
_mainThreadWebviews
.
addWebview
(
handle
,
input
.
webview
);
...
...
@@ -171,7 +171,7 @@ export class MainThreadWebviewPanelsAndViews extends Disposable implements extHo
public
$createWebviewPanel
(
extensionData
:
extHostProtocol
.
WebviewExtensionDescription
,
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
viewType
:
string
,
title
:
string
,
showOptions
:
{
viewColumn
?:
EditorViewColumn
,
preserveFocus
?:
boolean
;
},
...
...
@@ -196,23 +196,23 @@ export class MainThreadWebviewPanelsAndViews extends Disposable implements extHo
this
.
_telemetryService
.
publicLog
(
'
webviews:createWebviewPanel
'
,
{
extensionId
:
extension
.
id
.
value
});
}
public
$disposeWebview
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
void
{
public
$disposeWebview
(
handle
:
extHostProtocol
.
WebviewHandle
):
void
{
const
webview
=
this
.
getWebviewInput
(
handle
);
webview
.
dispose
();
}
public
$setTitle
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
value
:
string
):
void
{
public
$setTitle
(
handle
:
extHostProtocol
.
WebviewHandle
,
value
:
string
):
void
{
const
webview
=
this
.
getWebviewInput
(
handle
);
webview
.
setName
(
value
);
}
public
$setIconPath
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
value
:
{
light
:
UriComponents
,
dark
:
UriComponents
;
}
|
undefined
):
void
{
public
$setIconPath
(
handle
:
extHostProtocol
.
WebviewHandle
,
value
:
{
light
:
UriComponents
,
dark
:
UriComponents
;
}
|
undefined
):
void
{
const
webview
=
this
.
getWebviewInput
(
handle
);
webview
.
iconPath
=
reviveWebviewIcon
(
value
);
}
public
$reveal
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
showOptions
:
extHostProtocol
.
WebviewPanelShowOptions
):
void
{
public
$reveal
(
handle
:
extHostProtocol
.
WebviewHandle
,
showOptions
:
extHostProtocol
.
WebviewPanelShowOptions
):
void
{
const
webview
=
this
.
getWebviewInput
(
handle
);
if
(
webview
.
isDisposed
())
{
return
;
...
...
@@ -336,7 +336,7 @@ export class MainThreadWebviewPanelsAndViews extends Disposable implements extHo
}
}
private
getWebviewInput
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
WebviewInput
{
private
getWebviewInput
(
handle
:
extHostProtocol
.
WebviewHandle
):
WebviewInput
{
const
webview
=
this
.
tryGetWebviewInput
(
handle
);
if
(
!
webview
)
{
throw
new
Error
(
`Unknown webview handle:
${
handle
}
`
);
...
...
@@ -344,7 +344,7 @@ export class MainThreadWebviewPanelsAndViews extends Disposable implements extHo
return
webview
;
}
private
tryGetWebviewInput
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
WebviewInput
|
undefined
{
private
tryGetWebviewInput
(
handle
:
extHostProtocol
.
WebviewHandle
):
WebviewInput
|
undefined
{
return
this
.
_webviewInputs
.
getInputForHandle
(
handle
);
}
}
...
...
src/vs/workbench/api/browser/mainThreadWebviewViews.ts
浏览文件 @
7e4ccf16
...
...
@@ -28,7 +28,7 @@ export class MainThreadWebviewsViews extends Disposable implements extHostProtoc
this
.
_proxyViews
=
context
.
getProxy
(
extHostProtocol
.
ExtHostContext
.
ExtHostWebviewViews
);
}
public
$setWebviewViewTitle
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
value
:
string
|
undefined
):
void
{
public
$setWebviewViewTitle
(
handle
:
extHostProtocol
.
WebviewHandle
,
value
:
string
|
undefined
):
void
{
const
webviewView
=
this
.
_webviewViews
.
get
(
handle
);
if
(
!
webviewView
)
{
throw
new
Error
(
'
unknown webview view
'
);
...
...
src/vs/workbench/api/browser/mainThreadWebviews.ts
浏览文件 @
7e4ccf16
...
...
@@ -41,28 +41,28 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
this
.
_proxy
=
context
.
getProxy
(
extHostProtocol
.
ExtHostContext
.
ExtHostWebviews
);
}
public
addWebview
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
webview
:
WebviewOverlay
):
void
{
public
addWebview
(
handle
:
extHostProtocol
.
WebviewHandle
,
webview
:
WebviewOverlay
):
void
{
this
.
_webviews
.
set
(
handle
,
webview
);
this
.
hookupWebviewEventDelegate
(
handle
,
webview
);
}
public
$setHtml
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
value
:
string
):
void
{
public
$setHtml
(
handle
:
extHostProtocol
.
WebviewHandle
,
value
:
string
):
void
{
const
webview
=
this
.
getWebview
(
handle
);
webview
.
html
=
value
;
}
public
$setOptions
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
options
:
IWebviewOptions
):
void
{
public
$setOptions
(
handle
:
extHostProtocol
.
WebviewHandle
,
options
:
IWebviewOptions
):
void
{
const
webview
=
this
.
getWebview
(
handle
);
webview
.
contentOptions
=
reviveWebviewOptions
(
options
);
}
public
async
$postMessage
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
message
:
any
):
Promise
<
boolean
>
{
public
async
$postMessage
(
handle
:
extHostProtocol
.
WebviewHandle
,
message
:
any
):
Promise
<
boolean
>
{
const
webview
=
this
.
getWebview
(
handle
);
webview
.
postMessage
(
message
);
return
true
;
}
private
hookupWebviewEventDelegate
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
webview
:
WebviewOverlay
)
{
private
hookupWebviewEventDelegate
(
handle
:
extHostProtocol
.
WebviewHandle
,
webview
:
WebviewOverlay
)
{
const
disposables
=
new
DisposableStore
();
disposables
.
add
(
webview
.
onDidClickLink
((
uri
)
=>
this
.
onDidClickLink
(
handle
,
uri
)));
...
...
@@ -75,7 +75,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
}));
}
private
onDidClickLink
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
link
:
string
):
void
{
private
onDidClickLink
(
handle
:
extHostProtocol
.
WebviewHandle
,
link
:
string
):
void
{
const
webview
=
this
.
getWebview
(
handle
);
if
(
this
.
isSupportedLink
(
webview
,
URI
.
parse
(
link
)))
{
this
.
_openerService
.
open
(
link
,
{
fromUserGesture
:
true
});
...
...
@@ -92,7 +92,7 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
return
!!
webview
.
contentOptions
.
enableCommandUris
&&
link
.
scheme
===
Schemas
.
command
;
}
private
getWebview
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
Webview
{
private
getWebview
(
handle
:
extHostProtocol
.
WebviewHandle
):
Webview
{
const
webview
=
this
.
_webviews
.
get
(
handle
);
if
(
!
webview
)
{
throw
new
Error
(
`Unknown webview handle:
${
handle
}
`
);
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
7e4ccf16
...
...
@@ -581,7 +581,7 @@ export interface ExtHostEditorInsetsShape {
$onDidReceiveMessage
(
handle
:
number
,
message
:
any
):
void
;
}
export
type
Webview
Panel
Handle
=
string
;
export
type
WebviewHandle
=
string
;
export
interface
WebviewPanelShowOptions
{
readonly
viewColumn
?:
EditorViewColumn
;
...
...
@@ -609,17 +609,17 @@ export interface CustomTextEditorCapabilities {
}
export
interface
MainThreadWebviewsShape
extends
IDisposable
{
$setHtml
(
handle
:
Webview
Panel
Handle
,
value
:
string
):
void
;
$setOptions
(
handle
:
Webview
Panel
Handle
,
options
:
modes
.
IWebviewOptions
):
void
;
$postMessage
(
handle
:
Webview
Panel
Handle
,
value
:
any
):
Promise
<
boolean
>
$setHtml
(
handle
:
WebviewHandle
,
value
:
string
):
void
;
$setOptions
(
handle
:
WebviewHandle
,
options
:
modes
.
IWebviewOptions
):
void
;
$postMessage
(
handle
:
WebviewHandle
,
value
:
any
):
Promise
<
boolean
>
}
export
interface
MainThreadWebviewPanelsAndViewsShape
extends
IDisposable
{
$createWebviewPanel
(
extension
:
WebviewExtensionDescription
,
handle
:
Webview
Panel
Handle
,
viewType
:
string
,
title
:
string
,
showOptions
:
WebviewPanelShowOptions
,
options
:
modes
.
IWebviewPanelOptions
&
modes
.
IWebviewOptions
):
void
;
$disposeWebview
(
handle
:
Webview
Panel
Handle
):
void
;
$reveal
(
handle
:
Webview
Panel
Handle
,
showOptions
:
WebviewPanelShowOptions
):
void
;
$setTitle
(
handle
:
Webview
Panel
Handle
,
value
:
string
):
void
;
$setIconPath
(
handle
:
Webview
Panel
Handle
,
value
:
{
light
:
UriComponents
,
dark
:
UriComponents
;
}
|
undefined
):
void
;
$createWebviewPanel
(
extension
:
WebviewExtensionDescription
,
handle
:
WebviewHandle
,
viewType
:
string
,
title
:
string
,
showOptions
:
WebviewPanelShowOptions
,
options
:
modes
.
IWebviewPanelOptions
&
modes
.
IWebviewOptions
):
void
;
$disposeWebview
(
handle
:
WebviewHandle
):
void
;
$reveal
(
handle
:
WebviewHandle
,
showOptions
:
WebviewPanelShowOptions
):
void
;
$setTitle
(
handle
:
WebviewHandle
,
value
:
string
):
void
;
$setIconPath
(
handle
:
WebviewHandle
,
value
:
{
light
:
UriComponents
,
dark
:
UriComponents
;
}
|
undefined
):
void
;
$registerSerializer
(
viewType
:
string
):
void
;
$unregisterSerializer
(
viewType
:
string
):
void
;
...
...
@@ -638,7 +638,7 @@ export interface MainThreadWebviewViewsShape extends IDisposable {
$registerWebviewViewProvider
(
viewType
:
string
,
options
?:
{
retainContextWhenHidden
?:
boolean
}):
void
;
$unregisterWebviewViewProvider
(
viewType
:
string
):
void
;
$setWebviewViewTitle
(
handle
:
Webview
Panel
Handle
,
value
:
string
|
undefined
):
void
;
$setWebviewViewTitle
(
handle
:
WebviewHandle
,
value
:
string
|
undefined
):
void
;
}
export
interface
WebviewPanelViewStateData
{
...
...
@@ -650,18 +650,18 @@ export interface WebviewPanelViewStateData {
}
export
interface
ExtHostWebviewsShape
{
$onMessage
(
handle
:
Webview
Panel
Handle
,
message
:
any
):
void
;
$onMissingCsp
(
handle
:
Webview
Panel
Handle
,
extensionId
:
string
):
void
;
$onMessage
(
handle
:
WebviewHandle
,
message
:
any
):
void
;
$onMissingCsp
(
handle
:
WebviewHandle
,
extensionId
:
string
):
void
;
}
export
interface
ExtHostWebviewPanelsShape
{
$onDidChangeWebviewPanelViewStates
(
newState
:
WebviewPanelViewStateData
):
void
;
$onDidDisposeWebviewPanel
(
handle
:
Webview
Panel
Handle
):
Promise
<
void
>
;
$deserializeWebviewPanel
(
newWebviewHandle
:
Webview
Panel
Handle
,
viewType
:
string
,
title
:
string
,
state
:
any
,
position
:
EditorViewColumn
,
options
:
modes
.
IWebviewOptions
&
modes
.
IWebviewPanelOptions
):
Promise
<
void
>
;
$onDidDisposeWebviewPanel
(
handle
:
WebviewHandle
):
Promise
<
void
>
;
$deserializeWebviewPanel
(
newWebviewHandle
:
WebviewHandle
,
viewType
:
string
,
title
:
string
,
state
:
any
,
position
:
EditorViewColumn
,
options
:
modes
.
IWebviewOptions
&
modes
.
IWebviewPanelOptions
):
Promise
<
void
>
;
}
export
interface
ExtHostCustomEditorsShape
{
$resolveWebviewEditor
(
resource
:
UriComponents
,
newWebviewHandle
:
Webview
Panel
Handle
,
viewType
:
string
,
title
:
string
,
position
:
EditorViewColumn
,
options
:
modes
.
IWebviewOptions
&
modes
.
IWebviewPanelOptions
,
cancellation
:
CancellationToken
):
Promise
<
void
>
;
$resolveWebviewEditor
(
resource
:
UriComponents
,
newWebviewHandle
:
WebviewHandle
,
viewType
:
string
,
title
:
string
,
position
:
EditorViewColumn
,
options
:
modes
.
IWebviewOptions
&
modes
.
IWebviewPanelOptions
,
cancellation
:
CancellationToken
):
Promise
<
void
>
;
$createCustomDocument
(
resource
:
UriComponents
,
viewType
:
string
,
backupId
:
string
|
undefined
,
cancellation
:
CancellationToken
):
Promise
<
{
editable
:
boolean
}
>
;
$disposeCustomDocument
(
resource
:
UriComponents
,
viewType
:
string
):
Promise
<
void
>
;
...
...
@@ -675,15 +675,15 @@ export interface ExtHostCustomEditorsShape {
$backup
(
resource
:
UriComponents
,
viewType
:
string
,
cancellation
:
CancellationToken
):
Promise
<
string
>
;
$onMoveCustomEditor
(
handle
:
Webview
Panel
Handle
,
newResource
:
UriComponents
,
viewType
:
string
):
Promise
<
void
>
;
$onMoveCustomEditor
(
handle
:
WebviewHandle
,
newResource
:
UriComponents
,
viewType
:
string
):
Promise
<
void
>
;
}
export
interface
ExtHostWebviewViewsShape
{
$resolveWebviewView
(
webviewHandle
:
Webview
Panel
Handle
,
viewType
:
string
,
state
:
any
,
cancellation
:
CancellationToken
):
Promise
<
void
>
;
$resolveWebviewView
(
webviewHandle
:
WebviewHandle
,
viewType
:
string
,
state
:
any
,
cancellation
:
CancellationToken
):
Promise
<
void
>
;
$onDidChangeWebviewViewVisibility
(
webviewHandle
:
Webview
Panel
Handle
,
visible
:
boolean
):
void
;
$onDidChangeWebviewViewVisibility
(
webviewHandle
:
WebviewHandle
,
visible
:
boolean
):
void
;
$disposeWebviewView
(
webviewHandle
:
Webview
Panel
Handle
):
void
;
$disposeWebviewView
(
webviewHandle
:
WebviewHandle
):
void
;
}
export
enum
CellKind
{
...
...
src/vs/workbench/api/common/extHostCustomEditors.ts
浏览文件 @
7e4ccf16
...
...
@@ -247,7 +247,7 @@ export class ExtHostCustomEditors implements extHostProtocol.ExtHostCustomEditor
async
$resolveWebviewEditor
(
resource
:
UriComponents
,
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
viewType
:
string
,
title
:
string
,
position
:
EditorViewColumn
,
...
...
src/vs/workbench/api/common/extHostWebview.ts
浏览文件 @
7e4ccf16
...
...
@@ -21,7 +21,7 @@ import * as extHostTypes from './extHostTypes';
export
class
ExtHostWebview
implements
vscode
.
Webview
{
readonly
#
handle
:
extHostProtocol
.
Webview
Panel
Handle
;
readonly
#
handle
:
extHostProtocol
.
WebviewHandle
;
readonly
#
proxy
:
extHostProtocol
.
MainThreadWebviewsShape
;
readonly
#
deprecationService
:
IExtHostApiDeprecationService
;
...
...
@@ -35,7 +35,7 @@ export class ExtHostWebview implements vscode.Webview {
#
hasCalledAsWebviewUri
=
false
;
constructor
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
proxy
:
extHostProtocol
.
MainThreadWebviewsShape
,
options
:
vscode
.
WebviewOptions
,
initData
:
WebviewInitData
,
...
...
@@ -121,7 +121,7 @@ type IconPath = URI | { light: URI, dark: URI };
class
ExtHostWebviewPanel
extends
Disposable
implements
vscode
.
WebviewPanel
{
readonly
#
handle
:
extHostProtocol
.
Webview
Panel
Handle
;
readonly
#
handle
:
extHostProtocol
.
WebviewHandle
;
readonly
#
proxy
:
extHostProtocol
.
MainThreadWebviewPanelsAndViewsShape
;
readonly
#
viewType
:
string
;
...
...
@@ -142,7 +142,7 @@ class ExtHostWebviewPanel extends Disposable implements vscode.WebviewPanel {
public
readonly
onDidChangeViewState
=
this
.
#
onDidChangeViewState
.
event
;
constructor
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
proxy
:
extHostProtocol
.
MainThreadWebviewPanelsAndViewsShape
,
viewType
:
string
,
title
:
string
,
...
...
@@ -265,15 +265,15 @@ class ExtHostWebviewPanel extends Disposable implements vscode.WebviewPanel {
export
class
ExtHostWebviews
implements
extHostProtocol
.
ExtHostWebviewsShape
,
extHostProtocol
.
ExtHostWebviewPanelsShape
{
private
static
newHandle
():
extHostProtocol
.
Webview
Panel
Handle
{
private
static
newHandle
():
extHostProtocol
.
WebviewHandle
{
return
generateUuid
();
}
private
readonly
_proxy
:
extHostProtocol
.
MainThreadWebviewPanelsAndViewsShape
;
private
readonly
_webviewProxy
:
extHostProtocol
.
MainThreadWebviewsShape
;
private
readonly
_webviews
=
new
Map
<
extHostProtocol
.
Webview
Panel
Handle
,
ExtHostWebview
>
();
private
readonly
_webviewPanels
=
new
Map
<
extHostProtocol
.
Webview
Panel
Handle
,
ExtHostWebviewPanel
>
();
private
readonly
_webviews
=
new
Map
<
extHostProtocol
.
WebviewHandle
,
ExtHostWebview
>
();
private
readonly
_webviewPanels
=
new
Map
<
extHostProtocol
.
WebviewHandle
,
ExtHostWebviewPanel
>
();
private
readonly
_serializers
=
new
Map
<
string
,
{
readonly
serializer
:
vscode
.
WebviewPanelSerializer
;
...
...
@@ -314,7 +314,7 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape, ex
}
public
$onMessage
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
message
:
any
):
void
{
const
webview
=
this
.
getWebview
(
handle
);
...
...
@@ -324,7 +324,7 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape, ex
}
public
$onMissingCsp
(
_handle
:
extHostProtocol
.
Webview
Panel
Handle
,
_handle
:
extHostProtocol
.
WebviewHandle
,
extensionId
:
string
):
void
{
this
.
_logService
.
warn
(
`
${
extensionId
}
created a webview without a content security policy: https://aka.ms/vscode-webview-missing-csp`
);
...
...
@@ -363,7 +363,7 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape, ex
}
}
async
$onDidDisposeWebviewPanel
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
Promise
<
void
>
{
async
$onDidDisposeWebviewPanel
(
handle
:
extHostProtocol
.
WebviewHandle
):
Promise
<
void
>
{
const
panel
=
this
.
getWebviewPanel
(
handle
);
panel
?.
dispose
();
...
...
@@ -391,7 +391,7 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape, ex
}
async
$deserializeWebviewPanel
(
webviewHandle
:
extHostProtocol
.
Webview
Panel
Handle
,
webviewHandle
:
extHostProtocol
.
WebviewHandle
,
viewType
:
string
,
title
:
string
,
state
:
any
,
...
...
@@ -424,11 +424,11 @@ export class ExtHostWebviews implements extHostProtocol.ExtHostWebviewsShape, ex
return
webview
;
}
private
getWebview
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
ExtHostWebview
|
undefined
{
private
getWebview
(
handle
:
extHostProtocol
.
WebviewHandle
):
ExtHostWebview
|
undefined
{
return
this
.
_webviews
.
get
(
handle
);
}
public
getWebviewPanel
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
):
ExtHostWebviewPanel
|
undefined
{
public
getWebviewPanel
(
handle
:
extHostProtocol
.
WebviewHandle
):
ExtHostWebviewPanel
|
undefined
{
return
this
.
_webviewPanels
.
get
(
handle
);
}
}
...
...
src/vs/workbench/api/common/extHostWebviewView.ts
浏览文件 @
7e4ccf16
...
...
@@ -14,7 +14,7 @@ import * as extHostTypes from './extHostTypes';
class
ExtHostWebviewView
extends
Disposable
implements
vscode
.
WebviewView
{
readonly
#
handle
:
extHostProtocol
.
Webview
Panel
Handle
;
readonly
#
handle
:
extHostProtocol
.
WebviewHandle
;
readonly
#
proxy
:
extHostProtocol
.
MainThreadWebviewViewsShape
;
readonly
#
viewType
:
string
;
...
...
@@ -25,7 +25,7 @@ class ExtHostWebviewView extends Disposable implements vscode.WebviewView {
#
title
:
string
|
undefined
;
constructor
(
handle
:
extHostProtocol
.
Webview
Panel
Handle
,
handle
:
extHostProtocol
.
WebviewHandle
,
proxy
:
extHostProtocol
.
MainThreadWebviewViewsShape
,
viewType
:
string
,
webview
:
ExtHostWebview
,
...
...
@@ -101,7 +101,7 @@ export class ExtHostWebviewViews implements extHostProtocol.ExtHostWebviewViewsS
readonly
extension
:
IExtensionDescription
;
}
>
();
private
readonly
_webviewViews
=
new
Map
<
extHostProtocol
.
Webview
Panel
Handle
,
ExtHostWebviewView
>
();
private
readonly
_webviewViews
=
new
Map
<
extHostProtocol
.
WebviewHandle
,
ExtHostWebviewView
>
();
constructor
(
mainContext
:
extHostProtocol
.
IMainContext
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录