forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathLanguagePluginHelpers.ts
More file actions
91 lines (73 loc) · 2.73 KB
/
Copy pathLanguagePluginHelpers.ts
File metadata and controls
91 lines (73 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Copyright 2022 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import type {Chrome} from '../../extension-api/ExtensionAPI.js';
import * as Platform from '../core/platform/platform.js';
import type * as SDK from '../core/sdk/sdk.js';
import type * as Bindings from '../models/bindings/bindings.js';
const {urlString} = Platform.DevToolsPath;
export class TestPlugin implements Bindings.DebuggerLanguagePlugins.DebuggerLanguagePlugin {
constructor(name: string) {
this.name = name;
}
name: string;
handleScript(_script: SDK.Script.Script): boolean {
return false;
}
createPageResourceLoadInitiator(): SDK.PageResourceLoader.PageResourceLoadInitiator {
const extensionId = 'chrome-extension-id';
return {
target: null,
frameId: null,
extensionId,
initiatorUrl: urlString`${extensionId}`,
};
}
async evaluate(
_expression: string, _context: Chrome.DevTools.RawLocation,
_stopId: Bindings.DebuggerLanguagePlugins.StopId): Promise<Chrome.DevTools.RemoteObject|null> {
return null;
}
async getProperties(_objectId: string): Promise<Chrome.DevTools.PropertyDescriptor[]> {
return [];
}
async releaseObject(_objectId: string): Promise<void> {
}
async addRawModule(_rawModuleId: string, _symbolsURL: string, _rawModule: Chrome.DevTools.RawModule):
Promise<string[]> {
return [];
}
async sourceLocationToRawLocation(_sourceLocation: Chrome.DevTools.SourceLocation):
Promise<Chrome.DevTools.RawLocationRange[]> {
return [];
}
async rawLocationToSourceLocation(_rawLocation: Chrome.DevTools.RawLocation):
Promise<Chrome.DevTools.SourceLocation[]> {
return [];
}
async getScopeInfo(type: string): Promise<Chrome.DevTools.ScopeInfo> {
return {type, typeName: type};
}
async listVariablesInScope(_rawLocation: Chrome.DevTools.RawLocation): Promise<Chrome.DevTools.Variable[]> {
return [];
}
async removeRawModule(_rawModuleId: string): Promise<void> {
}
async getFunctionInfo(_rawLocation: Chrome.DevTools.RawLocation): Promise<{
frames: Chrome.DevTools.FunctionInfo[],
missingSymbolFiles: string[],
}|{frames: Chrome.DevTools.FunctionInfo[]}|{missingSymbolFiles: string[]}> {
return {frames: []};
}
async getInlinedFunctionRanges(_rawLocation: Chrome.DevTools.RawLocation):
Promise<Chrome.DevTools.RawLocationRange[]> {
return [];
}
async getInlinedCalleesRanges(_rawLocation: Chrome.DevTools.RawLocation):
Promise<Chrome.DevTools.RawLocationRange[]> {
return [];
}
async getMappedLines(_rawModuleId: string, _sourceFileURL: string): Promise<number[]|undefined> {
return undefined;
}
}