OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PROTECTED_H_ | 5 #ifndef IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ |
6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ | 6 #define IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ |
7 | 7 |
8 #import "ios/web/web_state/ui/crw_web_controller.h" | 8 #import "ios/web/web_state/ui/crw_web_controller.h" |
9 | 9 |
10 #import <WebKit/WebKit.h> | 10 #import <WebKit/WebKit.h> |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // CRWWebController. | 85 // CRWWebController. |
86 @interface CRWWebController ( | 86 @interface CRWWebController ( |
87 ProtectedMethods)<WKUIDelegate, WKNavigationDelegate> | 87 ProtectedMethods)<WKUIDelegate, WKNavigationDelegate> |
88 | 88 |
89 #pragma mark Methods implemented by subclasses | 89 #pragma mark Methods implemented by subclasses |
90 // Everything in this section must be implemented by subclasses. | 90 // Everything in this section must be implemented by subclasses. |
91 | 91 |
92 // Downloader for PassKit files. Lazy initialized. | 92 // Downloader for PassKit files. Lazy initialized. |
93 @property(nonatomic, readonly) CRWPassKitDownloader* passKitDownloader; | 93 @property(nonatomic, readonly) CRWPassKitDownloader* passKitDownloader; |
94 | 94 |
95 // The actual URL of the document object (i.e., the last committed URL). | |
96 // TODO(crbug.com/549616): Remove this in favor of just updating the | |
97 // navigation manager and treating that as authoritative. For now, this allows | |
98 // sharing the flow that's currently in the superclass. | |
99 @property(nonatomic, readonly) GURL documentURL; | |
100 | |
101 // YES if the user has interacted with the content area since the last URL | |
102 // change. | |
103 @property(nonatomic, readonly) BOOL interactionRegisteredSinceLastURLChange; | |
104 | |
105 // Sets _documentURL to newURL, and updates any relevant state information. | |
106 - (void)setDocumentURL:(const GURL&)newURL; | |
107 | |
108 // Returns the current URL of the web view, and sets |trustLevel| accordingly | |
109 // based on the confidence in the verification. | |
110 - (GURL)webURLWithTrustLevel:(web::URLVerificationTrustLevel*)trustLevel; | |
111 | |
112 // Returns the type of document object loaded in the web view. | 95 // Returns the type of document object loaded in the web view. |
113 - (web::WebViewDocumentType)webViewDocumentType; | 96 - (web::WebViewDocumentType)webViewDocumentType; |
114 | 97 |
115 - (void)loadRequest:(NSMutableURLRequest*)request; | 98 - (void)loadRequest:(NSMutableURLRequest*)request; |
116 | 99 |
117 // Called before loading current URL in WebView. | 100 // Called before loading current URL in WebView. |
118 - (void)willLoadCurrentURLInWebView; | 101 - (void)willLoadCurrentURLInWebView; |
119 | 102 |
120 // Loads request for the URL of the current navigation item. Subclasses may | 103 // Loads request for the URL of the current navigation item. Subclasses may |
121 // choose to build a new NSURLRequest and call |loadRequest| on the underlying | 104 // choose to build a new NSURLRequest and call |loadRequest| on the underlying |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // Returns YES if the object is being deallocated. | 195 // Returns YES if the object is being deallocated. |
213 @property(nonatomic, readonly) BOOL isBeingDestroyed; | 196 @property(nonatomic, readonly) BOOL isBeingDestroyed; |
214 | 197 |
215 // Return YES if network activity is being halted. Halting happens prior to | 198 // Return YES if network activity is being halted. Halting happens prior to |
216 // destruction. | 199 // destruction. |
217 @property(nonatomic, readonly) BOOL isHalted; | 200 @property(nonatomic, readonly) BOOL isHalted; |
218 | 201 |
219 // Returns whether the user is interacting with the page. | 202 // Returns whether the user is interacting with the page. |
220 @property(nonatomic, readonly) BOOL userIsInteracting; | 203 @property(nonatomic, readonly) BOOL userIsInteracting; |
221 | 204 |
222 // YES if a user interaction has been registered at any time since the page has | |
223 // loaded. | |
224 @property(nonatomic, readwrite) BOOL userInteractionRegistered; | |
225 | |
226 // YES if the web process backing _wkWebView is believed to currently be dead. | 205 // YES if the web process backing _wkWebView is believed to currently be dead. |
227 @property(nonatomic, assign) BOOL webProcessIsDead; | 206 @property(nonatomic, assign) BOOL webProcessIsDead; |
228 | 207 |
229 // Whether the web page is currently performing window.history.pushState or | 208 // Whether the web page is currently performing window.history.pushState or |
230 // window.history.replaceState | 209 // window.history.replaceState |
231 @property(nonatomic, readonly) BOOL changingHistoryState; | 210 @property(nonatomic, readonly) BOOL changingHistoryState; |
232 | 211 |
233 // Returns the current window id. | 212 // Returns the current window id. |
234 @property(nonatomic, readonly) NSString* windowId; | 213 @property(nonatomic, readonly) NSString* windowId; |
235 | 214 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 // result. | 398 // result. |
420 // Note that this approach includes multiple body encodings and decodings, plus | 399 // Note that this approach includes multiple body encodings and decodings, plus |
421 // the data is passed to |_wkWebView| on main thread. | 400 // the data is passed to |_wkWebView| on main thread. |
422 // This is necessary because WKWebView ignores POST request body. | 401 // This is necessary because WKWebView ignores POST request body. |
423 // Workaround for https://bugs.webkit.org/show_bug.cgi?id=145410 | 402 // Workaround for https://bugs.webkit.org/show_bug.cgi?id=145410 |
424 - (void)loadPOSTRequest:(NSMutableURLRequest*)request; | 403 - (void)loadPOSTRequest:(NSMutableURLRequest*)request; |
425 | 404 |
426 @end | 405 @end |
427 | 406 |
428 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ | 407 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ |
OLD | NEW |