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

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

Issue 1137143004: WebUI for WKWebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Returns the current URL of the web view, and sets |trustLevel| accordingly 103 // Returns the current URL of the web view, and sets |trustLevel| accordingly
104 // based on the confidence in the verification. 104 // based on the confidence in the verification.
105 - (GURL)webURLWithTrustLevel:(web::URLVerificationTrustLevel*)trustLevel; 105 - (GURL)webURLWithTrustLevel:(web::URLVerificationTrustLevel*)trustLevel;
106 106
107 // Registers the current user agent with the web view. 107 // Registers the current user agent with the web view.
108 - (void)registerUserAgent; 108 - (void)registerUserAgent;
109 109
110 // Returns the type of document object loaded in the web view. 110 // Returns the type of document object loaded in the web view.
111 - (web::WebViewDocumentType)webViewDocumentType; 111 - (web::WebViewDocumentType)webViewDocumentType;
112 112
113 // Loads the given request in the web view.
114 - (void)loadWebRequest:(NSURLRequest*)request;
115
116 // Loads the given HTML in the web view. 113 // Loads the given HTML in the web view.
117 - (void)loadWebHTMLString:(NSString*)html forURL:(const GURL&)URL; 114 - (void)loadWebHTMLString:(NSString*)html forURL:(const GURL&)URL;
118 115
119 // These public methods should be implemented by subclasses. 116 // These public methods should be implemented by subclasses.
120 //- (void)evaluateJavaScript:(NSString*)script 117 //- (void)evaluateJavaScript:(NSString*)script
121 // stringResultHandler:(web::JavaScriptCompletion)handler; 118 // stringResultHandler:(web::JavaScriptCompletion)handler;
122 //- (BOOL)scriptHasBeenInjectedForClass:(Class)jsInjectionManagerClass 119 //- (BOOL)scriptHasBeenInjectedForClass:(Class)jsInjectionManagerClass
123 // presenceBeacon:(NSString*)beacon; 120 // presenceBeacon:(NSString*)beacon;
121 //- (void)loadRequest:(NSMutableURLRequest*)request;
124 // Subclasses must call super's implementation. 122 // Subclasses must call super's implementation.
125 //- (void)injectScript:(NSString*)script 123 //- (void)injectScript:(NSString*)script
126 // forClass:(Class)jsInjectionManagerClass; 124 // forClass:(Class)jsInjectionManagerClass;
127 //- (web::WebViewType)webViewType; 125 //- (web::WebViewType)webViewType;
128 //- (void)evaluateUserJavaScript:(NSString*)script; 126 //- (void)evaluateUserJavaScript:(NSString*)script;
129 127
130 // Called before loading current URL in WebView. 128 // Called before loading current URL in WebView.
131 - (void)willLoadCurrentURLInWebView; 129 - (void)willLoadCurrentURLInWebView;
132 130
133 // Indicates whether or not there's an indication that the page is probably 131 // Indicates whether or not there's an indication that the page is probably
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 174
177 // Handles 'window.history.didPushState' message. 175 // Handles 'window.history.didPushState' message.
178 - (BOOL)handleWindowHistoryDidPushStateMessage:(base::DictionaryValue*)message 176 - (BOOL)handleWindowHistoryDidPushStateMessage:(base::DictionaryValue*)message
179 context:(NSDictionary*)context; 177 context:(NSDictionary*)context;
180 178
181 // Handles 'window.history.didReplaceState' message. 179 // Handles 'window.history.didReplaceState' message.
182 - (BOOL)handleWindowHistoryDidReplaceStateMessage: 180 - (BOOL)handleWindowHistoryDidReplaceStateMessage:
183 (base::DictionaryValue*)message 181 (base::DictionaryValue*)message
184 context:(NSDictionary*)context; 182 context:(NSDictionary*)context;
185 183
184 // Sets up WebUI for URL.
185 - (void)createWebUIForURL:(const GURL&)URL;
186
187 // Clears WebUI, if one exists.
188 - (void)clearWebUI;
189
186 #pragma mark - Internal methods for use by subclasses 190 #pragma mark - Internal methods for use by subclasses
187 191
188 // The web view's view of the current URL. During page transitions 192 // The web view's view of the current URL. During page transitions
189 // this may not be the same as the session history's view of the current URL. 193 // this may not be the same as the session history's view of the current URL.
190 // This method can change the state of the CRWWebController, as it will display 194 // This method can change the state of the CRWWebController, as it will display
191 // an error if the returned URL is not reliable from a security point of view. 195 // an error if the returned URL is not reliable from a security point of view.
192 // Note that this method is expensive, so it should always be cached locally if 196 // Note that this method is expensive, so it should always be cached locally if
193 // it's needed multiple times in a method. 197 // it's needed multiple times in a method.
194 @property(nonatomic, readonly) GURL currentURL; 198 @property(nonatomic, readonly) GURL currentURL;
195 199
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 358
355 // Returns the current transition type. 359 // Returns the current transition type.
356 - (ui::PageTransition)currentTransition; 360 - (ui::PageTransition)currentTransition;
357 361
358 // Resets pending external request information. 362 // Resets pending external request information.
359 - (void)resetExternalRequest; 363 - (void)resetExternalRequest;
360 364
361 @end 365 @end
362 366
363 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_ 367 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_PROTECTED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698