Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2784843002: Reading List: Mark entry read when opening external app. (Closed)
Patch Set: feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 5204ae4a1656e50bb3cc2cd284f5a327bef4315b..db6cffdf7ae4ce04b3e502c70d52360a2060232a 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -3063,6 +3063,8 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
if (![self shouldOpenExternalURLForNavigationAction:action]) {
return NO;
}
+ web::NavigationItem* item = self.currentNavItem;
+ GURL sourceURL = item ? item->GetOriginalRequestURL() : GURL::EmptyGURL();
// Stop load if navigation is believed to be happening on the main frame.
if ([self isMainFrameNavigationAction:action])
@@ -3084,6 +3086,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
if ([_delegate openExternalURL:requestURL
+ sourceURL:sourceURL
linkClicked:isNavigationTypeLinkActivated]) {
// Record the URL so that errors reported following the 'NO' reply can be
// safely ignored.
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698