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

Side by Side Diff: ios/clean/chrome/browser/ui/dialogs/dialog_mediator.mm

Issue 2929563002: [iOS Clean] Added dialogs UI support.
Patch Set: rebase & Mark's comments 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/clean/chrome/browser/ui/dialogs/dialog_mediator.h"
6
7 #include "base/logging.h"
8 #import "ios/clean/chrome/browser/ui/commands/dialog_commands.h"
9 #import "ios/clean/chrome/browser/ui/dialogs/dialog_button_configuration.h"
10 #import "ios/clean/chrome/browser/ui/dialogs/dialog_consumer.h"
11 #import "ios/clean/chrome/browser/ui/dialogs/dialog_mediator+subclassing.h"
12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
17 @implementation DialogMediator
18
19 #pragma mark - Public
20
21 - (void)updateConsumer:(id<DialogConsumer>)consumer {
22 [consumer setDialogTitle:[self dialogTitle]];
23 [consumer setDialogMessage:[self dialogMessage]];
24 [consumer setDialogButtonConfigurations:[self buttonConfigs]];
25 [consumer setDialogTextFieldConfigurations:[self textFieldConfigs]];
26 }
27
28 #pragma mark - DialogDismissalCommands
29
30 - (void)dismissDialogWithButtonID:(id)buttonID
31 textFieldValues:
32 (NSDictionary<id, NSString*>*)textFieldValues {
33 // Implemented by subclasses.
34 }
35
36 @end
37
38 @implementation DialogMediator (Subclassing)
39
40 - (NSString*)dialogTitle {
41 // Implemented by subclasses.
42 return nil;
43 }
44
45 - (NSString*)dialogMessage {
46 // Implemented by subclasses.
47 return nil;
48 }
49
50 - (NSArray<DialogButtonConfiguration*>*)buttonConfigs {
51 // Implemented by subclasses.
52 return nil;
53 }
54
55 - (NSArray<DialogTextFieldConfiguration*>*)textFieldConfigs {
56 // Implemented by subclasses.
57 return nil;
58 }
59
60 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698