Skip to content

Commit

Permalink
[WebEngine] Fix context for Toast in fullscreen mode
Browse files Browse the repository at this point in the history
Change-Id: Iad6538eddf5026dae35c3a3f46116374dd565c68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4307252
Commit-Queue: Susanne Westphal <swestphal@chromium.org>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113913}
  • Loading branch information
s-westphal authored and Chromium LUCI CQ committed Mar 7, 2023
1 parent cb99070 commit 9d0d780
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ private void showToast() {
assert mToast == null;
mDidShowToast = true;
int resId = R.string.immersive_fullscreen_api_notification;
mToast = Toast.makeText(mView.getContext(), resId, Toast.LENGTH_LONG);
mToast = Toast.makeText(
mTab.getBrowser().getBrowserFragment().getWindowAndroid().getContext().get(), resId,
Toast.LENGTH_LONG);
mToast.setGravity(Gravity.TOP | Gravity.CENTER, 0, 0);
mToast.show();
}
Expand Down

0 comments on commit 9d0d780

Please sign in to comment.