| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ | 6 #define IOS_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #import "base/ios/block_types.h" | 10 #import "base/ios/block_types.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 // Create an title for the alert base on the URL. | 80 // Create an title for the alert base on the URL. |
| 81 + (NSString*)localizedTitleForJavaScriptAlertFromPage:(const GURL&)pageURL; | 81 + (NSString*)localizedTitleForJavaScriptAlertFromPage:(const GURL&)pageURL; |
| 82 | 82 |
| 83 @end | 83 @end |
| 84 | 84 |
| 85 @interface DialogPresenter (ExposedForTesting) | 85 @interface DialogPresenter (ExposedForTesting) |
| 86 // The dialog currently being shown. | 86 // The dialog currently being shown. |
| 87 @property(nonatomic, readonly) AlertCoordinator* presentedDialogCoordinator; | 87 @property(nonatomic, readonly) AlertCoordinator* presentedDialogCoordinator; |
| 88 | 88 |
| 89 // Called when a button in |dialog| is tapped. | 89 // Called when |coordinator| is stopped. |
| 90 - (void)buttonWasTappedForCoordinator:(AlertCoordinator*)coordinator; | 90 - (void)dialogCoordinatorWasStopped:(AlertCoordinator*)coordinator; |
| 91 | 91 |
| 92 @end | 92 @end |
| 93 | 93 |
| 94 // Delegate protocol for DialogPresenter. | 94 // Delegate protocol for DialogPresenter. |
| 95 @protocol DialogPresenterDelegate<NSObject> | 95 @protocol DialogPresenterDelegate<NSObject> |
| 96 | 96 |
| 97 // Called by |presenter| before showing the queued modal dialog associated with | 97 // Called by |presenter| before showing the queued modal dialog associated with |
| 98 // |context|. | 98 // |context|. |
| 99 - (void)dialogPresenter:(DialogPresenter*)presenter | 99 - (void)dialogPresenter:(DialogPresenter*)presenter |
| 100 willShowDialogForWebState:(web::WebState*)webState; | 100 willShowDialogForWebState:(web::WebState*)webState; |
| 101 | 101 |
| 102 // Whether the delegate is presenting another View Controller. | 102 // Whether the delegate is presenting another View Controller. |
| 103 @property(nonatomic, assign) BOOL presenting; | 103 @property(nonatomic, assign) BOOL presenting; |
| 104 | 104 |
| 105 @end | 105 @end |
| 106 | 106 |
| 107 #endif // IOS_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ | 107 #endif // IOS_CHROME_BROWSER_UI_DIALOGS_DIALOG_PRESENTER_H_ |
| OLD | NEW |