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

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

Issue 1353503003: Always set the serialized state object for history navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | 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.h
diff --git a/ios/web/web_state/ui/crw_web_controller.h b/ios/web/web_state/ui/crw_web_controller.h
index b7d5225fa6d3728f876f26636b18f51bc9b46ef2..27aef98e074f19576334e59df4b4cf346a3ee3bb 100644
--- a/ios/web/web_state/ui/crw_web_controller.h
+++ b/ios/web/web_state/ui/crw_web_controller.h
@@ -185,12 +185,14 @@ class WebStateImpl;
// Loads the URL indicated by current session state.
- (void)loadCurrentURL;
-// Updates UIWebView's URL and urlOnStartLoading_ during back/forward navigation
-// over pushed URLs. Needed so that sites that depend on URL params/fragment
-// continue to work correctly and checks for the URL don't incorrectly trigger
-// -pageChanged calls.
-- (void)finishPushStateNavigationToURL:(const GURL&)url
- withStateObject:(NSString*)stateObject;
+// Injects JavaScript into the web view to update the URL to |url|, to set
+// window.history.state to |stateObject|, and to trigger a popstate() event.
+// Upon the scripts completion, resets |urlOnStartLoading_| and
+// |_lastRegisteredRequestURL| to |url|. This is necessary so that sites that
+// depend on URL params/fragments continue to work correctly and that checks for
+// the URL don't incorrectly trigger |-pageChanged| calls.
+- (void)setPushedOrReplacedURL:(const GURL&)url
Eugene But (OOO till 7-30) 2015/09/18 02:02:35 Since this method is not called anywhere, lets tak
Eugene But (OOO till 7-30) 2015/09/18 02:02:36 NIT: s/url/URL (including changes in the comments)
kkhorimoto 2015/09/21 22:55:13 Done.
+ stateObject:(NSString*)stateObject;
// Loads the HTML into the page.
- (void)loadHTML:(NSString*)html;
// Loads HTML in the page and presents it as if it was originating from an
@@ -301,7 +303,7 @@ class WebStateImpl;
// Helper method called at the end of history navigation methods goBack,
// goForward, and goDelta. Determines whether to load a new URL or call
-// |finishPushStateNavigationToURL:withStateObject:|. |fromEntry| is the
+// |setPushedOrReplacedURL:stateObject:|. |fromEntry| is the
Eugene But (OOO till 7-30) 2015/09/18 02:02:36 NIT: I think mentioning setPushedOrReplacedURL:sta
kkhorimoto 2015/09/21 22:55:13 Done.
// CRWSessionEntry that was the current entry prior to the navigation.
// TODO(rohitrao): This is only exposed so Tab can call it temporarily. Remove
// as soon as all the Tab calls have moved into CRWWebController.
« no previous file with comments | « no previous file | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698