File tree Expand file tree Collapse file tree 7 files changed +53
-3
lines changed Expand file tree Collapse file tree 7 files changed +53
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ export const state = {
31
31
chrome . action . setTitle ( { title : "Click to capture the trace" } ) ;
32
32
} ,
33
33
34
+ stopping ( ) {
35
+ this . recordingState = "stopping" ;
36
+ setIcons ( "stopping" ) ;
37
+ chrome . action . setTitle ( { title : "Capturing a trace" } ) ;
38
+ } ,
39
+
34
40
reset ( ) {
35
41
// Reset the state
36
42
this . recordingState = "idle" ;
@@ -79,7 +85,7 @@ export const state = {
79
85
80
86
/**
81
87
* Sets the icon of the extension
82
- * @param {"on" | "off" } variant
88
+ * @param {"on" | "off" | "stopping" } variant
83
89
*/
84
90
function setIcons ( variant ) {
85
91
chrome . action . setIcon ( {
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export async function stopTracingAndCollect() {
101
101
console . warn ( "Failed to get the Tab ID" ) ;
102
102
return ;
103
103
}
104
- state . recordingState = " stopping" ;
104
+ state . stopping ( ) ;
105
105
106
106
// Add the event listener first and then stop the tracing.
107
107
chrome . debugger . onEvent . addListener (
@@ -153,7 +153,7 @@ export async function stopTracing() {
153
153
console . warn ( "Failed to get the Tab ID" ) ;
154
154
return ;
155
155
}
156
- state . recordingState = " stopping" ;
156
+ state . stopping ( ) ;
157
157
158
158
// Stop tracing without collecting the trace.
159
159
await chrome . debugger . sendCommand ( { tabId } , "Tracing.end" ) ;
You can’t perform that action at this time.
0 commit comments