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

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

Issue 1806043004: [ios] Refactored dialogs suppression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 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 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 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Returns the x, y offset the content has been scrolled. 115 // Returns the x, y offset the content has been scrolled.
116 @property(nonatomic, readonly) CGPoint scrollPosition; 116 @property(nonatomic, readonly) CGPoint scrollPosition;
117 117
118 // Returns whether the top of the content is visible. 118 // Returns whether the top of the content is visible.
119 @property(nonatomic, readonly) BOOL atTop; 119 @property(nonatomic, readonly) BOOL atTop;
120 120
121 // Whether or not content can programmatically display the keyboard. 121 // Whether or not content can programmatically display the keyboard.
122 @property(nonatomic, assign) BOOL keyboardDisplayRequiresUserAction; 122 @property(nonatomic, assign) BOOL keyboardDisplayRequiresUserAction;
123 123
124 // YES if JavaScript dialogs, HTTP authentication dialogs and window.open
125 // calls should be suppressed. Default is NO. When dialog is suppressed
126 // |CRWWebDelegate webControllerDidSuppressDialog:| will be called.
127 @property(nonatomic, assign) BOOL suppressDialogs;
128
124 // Return an image to use as replacement of a missing snapshot. 129 // Return an image to use as replacement of a missing snapshot.
125 + (UIImage*)defaultSnapshotImage; 130 + (UIImage*)defaultSnapshotImage;
126 131
127 // Replaces the currently displayed content with |contentView|. The content 132 // Replaces the currently displayed content with |contentView|. The content
128 // view will be dismissed for the next navigation. 133 // view will be dismissed for the next navigation.
129 - (void)showTransientContentView:(CRWContentView*)contentView; 134 - (void)showTransientContentView:(CRWContentView*)contentView;
130 135
131 // Clear the transient content view, if one is shown. 136 // Clear the transient content view, if one is shown.
132 - (void)clearTransientContentView; 137 - (void)clearTransientContentView;
133 138
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 238
234 // Sets the closed property to true for the child window with the given name. 239 // Sets the closed property to true for the child window with the given name.
235 - (void)childWindowClosed:(NSString*)windowName; 240 - (void)childWindowClosed:(NSString*)windowName;
236 241
237 // Show overlay, don't reload web page. Used when the view will be 242 // Show overlay, don't reload web page. Used when the view will be
238 // visible only briefly (e.g., tablet side swipe). 243 // visible only briefly (e.g., tablet side swipe).
239 - (void)setOverlayPreviewMode:(BOOL)overlayPreviewMode; 244 - (void)setOverlayPreviewMode:(BOOL)overlayPreviewMode;
240 245
241 // Sets policy for web page dialog handling. Controls dialog suppression and 246 // Sets policy for web page dialog handling. Controls dialog suppression and
242 // notifying the WebDelegate. 247 // notifying the WebDelegate.
248 // TODO(crbug.com/595463): remove this method, once embedder uses
249 // |setSuppressDialogs|.
243 - (void)setPageDialogOpenPolicy:(web::PageDialogOpenPolicy)policy; 250 - (void)setPageDialogOpenPolicy:(web::PageDialogOpenPolicy)policy;
244 251
245 // Records the state (scroll position, form values, whatever can be harvested) 252 // Records the state (scroll position, form values, whatever can be harvested)
246 // from the current page into the current session entry. 253 // from the current page into the current session entry.
247 - (void)recordStateInHistory; 254 - (void)recordStateInHistory;
248 // Restores the state for this page from session history. 255 // Restores the state for this page from session history.
249 // TODO(stuartmorgan): This is public only temporarily; once refactoring is 256 // TODO(stuartmorgan): This is public only temporarily; once refactoring is
250 // complete it will be handled internally. 257 // complete it will be handled internally.
251 - (void)restoreStateFromHistory; 258 - (void)restoreStateFromHistory;
252 259
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // Returns the header height. 333 // Returns the header height.
327 - (CGFloat)headerHeight; 334 - (CGFloat)headerHeight;
328 335
329 // Caches request POST data in the given session entry. Exposed for testing. 336 // Caches request POST data in the given session entry. Exposed for testing.
330 - (void)cachePOSTDataForRequest:(NSURLRequest*)request 337 - (void)cachePOSTDataForRequest:(NSURLRequest*)request
331 inSessionEntry:(CRWSessionEntry*)currentSessionEntry; 338 inSessionEntry:(CRWSessionEntry*)currentSessionEntry;
332 339
333 @end 340 @end
334 341
335 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_ 342 #endif // IOS_WEB_WEB_STATE_UI_CRW_WEB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/web/web_state/js/resources/dialog_overrides.js ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698