PermissionWizard: Add delegate and permission-checking logic

This adds a permission-checking Delegate interface, which would
implement the permission-checks, and provide the results via
asynchronous callback to the PermissionWizard. This also adds the
logic to poll the permission-checker and show the appropriate UI.

This will skip showing any pages whose permissions are already granted.
A dialog (page of the wizard) is only shown for each denied permission.
If all permissions are granted, nothing at all will be shown to the
user. If at least one permission is denied, the wizard will be shown,
and the user will see the "All set!" page at the end.

Still TODO: add a mechanism for the caller of PermissionWizard to know
when the user cancels or completes the wizard. This would, for example,
allow a command-line tool to wait until the wizard is finished before
quitting with an exit-code.

Bug: 1015201
Change-Id: Icf977d122c548b31c91c4ae0a71200c43ed241cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902116
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714069}
2 files changed