feat: extend navigationHistory API (#42014)

* feat: extend navigationHistory API

* refactor: simplify index checking

* refactor: rename 'getHistory' and 'replaceHistory' methods of navigationHistory

* refactor: rename delete*() methods to remove*()

* feat: remove navigationHistory.replaceHistory()

* tests: add tests for removeEntryAtIndex and getAllEntries
This commit is contained in:
Vít Černý 2024-08-19 21:46:04 +02:00 committed by GitHub
parent 4c3014944c
commit 189675575c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 105 additions and 6 deletions

View file

@ -204,6 +204,8 @@ class WebContents : public ExclusiveAccessContext,
void GoToIndex(int index);
int GetActiveIndex() const;
content::NavigationEntry* GetNavigationEntryAtIndex(int index) const;
bool RemoveNavigationEntryAtIndex(int index);
std::vector<content::NavigationEntry*> GetHistory() const;
void ClearHistory();
int GetHistoryLength() const;
const std::string GetWebRTCIPHandlingPolicy() const;