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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.h

Issue 2578973002: Reload offline version on load failure (Closed)
Patch Set: clean Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ 5 #ifndef IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_
6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ 6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #import "ios/web/net/crw_request_tracker_delegate.h" 10 #import "ios/web/net/crw_request_tracker_delegate.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // Loads HTML in the page and presents it as if it was originating from an 168 // Loads HTML in the page and presents it as if it was originating from an
169 // application specific URL. 169 // application specific URL.
170 - (void)loadHTML:(NSString*)HTML forAppSpecificURL:(const GURL&)URL; 170 - (void)loadHTML:(NSString*)HTML forAppSpecificURL:(const GURL&)URL;
171 171
172 // Loads HTML in the page and presents it as if it was originating from the 172 // Loads HTML in the page and presents it as if it was originating from the
173 // URL itself. Should be used only in specific cases, where the injected html 173 // URL itself. Should be used only in specific cases, where the injected html
174 // is guaranteed to be some derived representation of the original content. 174 // is guaranteed to be some derived representation of the original content.
175 - (void)loadHTMLForCurrentURL:(NSString*)HTML; 175 - (void)loadHTMLForCurrentURL:(NSString*)HTML;
176 176
177 // Loads the offline version of |URL| as the loading of the online version
178 // failed.
179 - (void)displayOfflineVersionForURL:(const GURL&)URL;
Eugene But (OOO till 7-30) 2016/12/15 19:10:03 Who will call this method? Please note that ios/ch
180
177 // Stops loading the page. 181 // Stops loading the page.
178 - (void)stopLoading; 182 - (void)stopLoading;
179 183
180 // Causes the page to start loading immediately if there is a pending load; 184 // Causes the page to start loading immediately if there is a pending load;
181 // normally if the web view has been paged out for memory reasons, loads are 185 // normally if the web view has been paged out for memory reasons, loads are
182 // started lazily the next time the view is displayed. This can be called to 186 // started lazily the next time the view is displayed. This can be called to
183 // bypass the lazy behavior. This is equivalent to calling -view, but should be 187 // bypass the lazy behavior. This is equivalent to calling -view, but should be
184 // used when deliberately pre-triggering a load without displaying. 188 // used when deliberately pre-triggering a load without displaying.
185 - (void)triggerPendingLoad; 189 - (void)triggerPendingLoad;
186 190
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 302
299 // Acts on a single message from the JS object, parsed from JSON into a 303 // Acts on a single message from the JS object, parsed from JSON into a
300 // DictionaryValue. Returns NO if the format for the message was invalid. 304 // DictionaryValue. Returns NO if the format for the message was invalid.
301 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage 305 - (BOOL)respondToMessage:(base::DictionaryValue*)crwMessage
302 userIsInteracting:(BOOL)userIsInteracting 306 userIsInteracting:(BOOL)userIsInteracting
303 originURL:(const GURL&)originURL; 307 originURL:(const GURL&)originURL;
304 308
305 @end 309 @end
306 310
307 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ 311 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698