Skip to content

Commit

Permalink
Bug 1811076: Part 6 - Show a cancelable "slow agent" dialog on slow c…
Browse files Browse the repository at this point in the history
…ontent analysis r=nika,Gijs,rkraesig,fluent-reviewers,bolsson

This adds a modal dialog to some content analysis use cases that blocks
input while CA is running.  The dialog can be canceled, which cancels the
CA (if possible) and the operation that required it.

Differential Revision: https://phabricator.services.mozilla.com/D189578

UltraBlame original commit: 7ca7d7ab66453b81c86545a277ab0fdde9f19171
  • Loading branch information
marco-c committed Dec 12, 2023
1 parent 1a20206 commit 3da0dcb
Show file tree
Hide file tree
Showing 12 changed files with 2,081 additions and 500 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ lazy
{
}
;
XPCOMUtils
.
defineLazyServiceGetter
(
lazy
"
gContentAnalysis
"
"
mozilla
.
org
/
contentanalysis
;
1
"
Ci
.
nsIContentAnalysis
)
;
ChromeUtils
.
defineESModuleGetters
Expand Down Expand Up @@ -2236,7 +2258,27 @@ aOperation
)
{
return
false
!
(
aOperation
=
=
Ci
.
nsIContentAnalysisRequest
.
FILE_DOWNLOADED
|
|
aOperation
=
=
Ci
.
nsIContentAnalysisRequest
.
PRINT
)
;
}
/
Expand Down Expand Up @@ -2696,6 +2738,12 @@ Ci
nsIPromptService
.
BUTTON_TITLE_CANCEL
+
Ci
.
nsIPromptService
.
SHOW_SPINNER
null
null
null
Expand Down Expand Up @@ -2809,6 +2857,15 @@ aRequestToken
)
)
{
lazy
.
gContentAnalysis
.
cancelContentAnalysisRequest
(
aRequestToken
)
;
let
dlpBusyView
=
Expand Down
10 changes: 10 additions & 0 deletions netwerk/base/nsIPrompt.idl
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@ BUTTON_DELAY_ENABLE
const
unsigned
long
SHOW_SPINNER
=
1
<
<
27
;
const
unsigned
long
STD_OK_CANCEL_BUTTONS
=
(
Expand Down
Loading

0 comments on commit 3da0dcb

Please sign in to comment.