scanner: Pause glow animation immediately if Scanner is not enabled.
The glow animation in the standalone app currently continues until Scanner processing has finished. If Sunfish is enabled and Scanner is disabled, this means that the glow animation continues indefinitely. UX has suggested that in the case Scanner is disabled, the glow animation should continue until Sunfish OCR finishes. We don't have such a signal yet, so for now just immediately pause the animation if Scanner is disabled. Bug: b:400798746 Change-Id: I8c2fa86b45d2cdd7c22c60bda5bd66aedd573589 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6406988 Reviewed-by: Elijah Hewer <hewer@chromium.org> Commit-Queue: Michelle Chen <michellegc@google.com> Reviewed-by: Xiaoqian Dai <xdai@chromium.org> Cr-Commit-Position: refs/heads/main@{#1439778}
This commit is contained in:
parent
9514e18bce
commit
48508f3aaa
@ -1470,6 +1470,13 @@ void CaptureModeSession::OnPerformCaptureForSearchEnded(
|
||||
CHECK(capture_region_overlay_controller_);
|
||||
capture_region_overlay_controller_->StartGlowAnimation(
|
||||
/*animation_delegate=*/this);
|
||||
// TODO(crbug.com/400798746): If Scanner is not enabled, the glow animation
|
||||
// should continue until OCR has completed. For now, just immediately pause
|
||||
// the animation in order to avoid the animation continuing indefinitely.
|
||||
ScannerController* scanner_controller = Shell::Get()->scanner_controller();
|
||||
if (!scanner_controller || !scanner_controller->CanStartSession()) {
|
||||
capture_region_overlay_controller_->PauseGlowAnimation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user