Commit 6410e7e9 authored by ckitagawa's avatar ckitagawa Committed by Commit Bot

[Paint Preview] Don't exit player on same document navigation

During capture TabObserver#onLoadStarted() may be triggered if the page
is still loading (e.g lazily loaded content). We should avoid exiting
in such a scenario.

Bug: 1084657
Change-Id: I680c85d6b918bf054e285f37445a7c3674158959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212402Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771623}
parent ce6e2ba6
...@@ -59,6 +59,9 @@ public class PaintPreviewTabHelper extends EmptyTabObserver implements UserData ...@@ -59,6 +59,9 @@ public class PaintPreviewTabHelper extends EmptyTabObserver implements UserData
@Override @Override
public void onLoadStarted(Tab tab, boolean toDifferentDocument) { public void onLoadStarted(Tab tab, boolean toDifferentDocument) {
// Note this doesn't apply to forced reloads, which is desirable in this case.
if (!toDifferentDocument) return;
removePaintPreviewDemoIfShowing(); removePaintPreviewDemoIfShowing();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment