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 = {
3131 chrome . action . setTitle ( { title : "Click to capture the trace" } ) ;
3232 } ,
3333
34+ stopping ( ) {
35+ this . recordingState = "stopping" ;
36+ setIcons ( "stopping" ) ;
37+ chrome . action . setTitle ( { title : "Capturing a trace" } ) ;
38+ } ,
39+
3440 reset ( ) {
3541 // Reset the state
3642 this . recordingState = "idle" ;
@@ -79,7 +85,7 @@ export const state = {
7985
8086/**
8187 * Sets the icon of the extension
82- * @param {"on" | "off" } variant
88+ * @param {"on" | "off" | "stopping" } variant
8389 */
8490function setIcons ( variant ) {
8591 chrome . action . setIcon ( {
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export async function stopTracingAndCollect() {
101101 console . warn ( "Failed to get the Tab ID" ) ;
102102 return ;
103103 }
104- state . recordingState = " stopping" ;
104+ state . stopping ( ) ;
105105
106106 // Add the event listener first and then stop the tracing.
107107 chrome . debugger . onEvent . addListener (
@@ -153,7 +153,7 @@ export async function stopTracing() {
153153 console . warn ( "Failed to get the Tab ID" ) ;
154154 return ;
155155 }
156- state . recordingState = " stopping" ;
156+ state . stopping ( ) ;
157157
158158 // Stop tracing without collecting the trace.
159159 await chrome . debugger . sendCommand ( { tabId } , "Tracing.end" ) ;
You can’t perform that action at this time.
0 commit comments