Skip to content

Commit

Permalink
[Chromium] Add support to purge session history
Browse files Browse the repository at this point in the history
The Session's purgeHistory() method was not implemented in Chromium.
This method purges the session history.
  • Loading branch information
svillar committed Oct 4, 2024
1 parent cf90131 commit 6f684f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ public void gotoHistoryIndex(int index) {

@Override
public void purgeHistory() {
// TODO: Implement
if (isOpen())
mTab.purgeHistory();
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ public void exitFullScreen() {
public void onMediaFullscreen(boolean isFullscreen) {
mTabMediaSessionObserver.onMediaFullscreen(isFullscreen);
}

public void purgeHistory() {
mWebContents.getNavigationController().clearHistory();
}
}

0 comments on commit 6f684f3

Please sign in to comment.