Commit b8e01908 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Do not override deprecated NavigationItemChanged in IOSChromeLocalSessionEventRouter.

NavigationItemChanged is called in 2 cases:
1.) title was changed for navigation item
2.) window.location.replace API was called

Case #1 can be tracked with TitleWasSet and case #2 can be tarcked with
DidFinishNavigation.

IOSChromeLocalSessionEventRouter already overrides DidFinishNavigation,
so this CL replaces NavigationItemChanged with TitleWasSet.

Bug: 720786
Change-Id: I15f839467cc2541308823038eae86ec9a6a9a9e0
Reviewed-on: https://chromium-review.googlesource.com/c/1369053
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615696}
parent 5534e46f
......@@ -58,7 +58,7 @@ class IOSChromeLocalSessionEventRouter
// web::WebStateObserver:
void NavigationItemsPruned(web::WebState* web_state,
size_t pruned_item_count) override;
void NavigationItemChanged(web::WebState* web_state) override;
void TitleWasSet(web::WebState* web_state) override;
void DidFinishNavigation(web::WebState* web_state,
web::NavigationContext* navigation_context) override;
void PageLoaded(
......
......@@ -117,8 +117,7 @@ void IOSChromeLocalSessionEventRouter::NavigationItemsPruned(
OnWebStateChange(web_state);
}
void IOSChromeLocalSessionEventRouter::NavigationItemChanged(
web::WebState* web_state) {
void IOSChromeLocalSessionEventRouter::TitleWasSet(web::WebState* web_state) {
OnWebStateChange(web_state);
}
......
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