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

Side by Side Diff: ios/chrome/browser/ui/dialogs/dialog_presenter.h

Issue 2936643003: Allow cancelling the currently-presented dialog. (Closed)
Patch Set: fix compilation Created 3 years, 6 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
« no previous file with comments | « no previous file | ios/chrome/browser/ui/dialogs/dialog_presenter.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/dialogs/dialog_presenter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698