[ios] Prevent nil baseView for snapshot

Previously, a nil baseView was being returned for the baseView to be
used for snapshots. This should not be nil. This was silently failing.

One negative outcome of a nil baseView is that tabs opened in the
background do not have snapshots taken. This was not an inability of
snapshots to be taken when the view is not in the view hierarchy.

This CL returns a non-nil baseView. This enabled snapshots to be taken
of tabs that were opened in the background. This includes opening
a set of remote tabs.

Bug: 919374
Change-Id: I6889cd3fe77e1510465ab3f877f2271736085ad0
Reviewed-on: https://chromium-review.googlesource.com/c/1396928
Reviewed-by: edchin <edchin@chromium.org>
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Kurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620756}
1 file changed