New issue
Advanced search Search tips

Issue 762663 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 1
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[iOS Clean] Handle dialog-specific commands internally.

Project Member Reported by kkhorimoto@chromium.org, Sep 6 2017

Issue description

Per discussion on crrev.com/c/617994:

https://chromium-review.googlesource.com/c/chromium/src/+/617994/3/ios/clean/chrome/browser/ui/commands/java_script_dialog_blocking_commands.h#13

Some commands are only necessary for internal state maintenance for a coordinator/mediator/view controller component (i.e. ContextMenuDismissalCommands, HTTPAuthDialogDismissalCommands, JavaScriptDialogBlockingDismissalCommands, JavaScriptDialogDismissalCommands).  For these situations, the view controller (subclass of UIAlertController) automatically dismisses itself when a user interacts with it.  In this situation, it's necessary to send a command to its coordinator to call |-stop| so that the coordinator hierarchy stays in sync with the view controller hierarchy.  Since these will never need to be handled by classes other than the coordinators, we should find a way to handle this internally without polluting the commands/ directory.

Some possible solutions:
- Create a commands/ directory for each dialog type where we can declare commands that are only used internally.  This is my preferred method since it's most in-line with the current implementation.
- Pass a coordinator pointer to the mediator and call |-stop| from the mediator's command handling.
- Use delegation to notify coordinators when their view controllers dismiss themselves.
 
Status: WontFix (was: Started)

Sign in to add a comment