[CrOS Settings] Allow arrow navigation through changePicture camera icon

Background

A change from February, 2018 [1] adjusted the changePicture page's
behavior so that when the user navigates to the camera and the camera
is ready to show its video stream (corresponding to the event 'canplay'
on the nested <video> element), the camera's "takePhoto" button becomes
the active element. Before this, the camera would appear active to the
user but it would require an extra click on the cr-picture-list's
camera icon to actually activate it for taking a photo.

However, because the focus went to the "takePhoto" button, it left the
cr-picture-list altogether and therefore it was no longer receiving
keyboard events. As a result, the user would be unable to continue
navigating through the list without clicking on it again.

-----

This CL listens for keyboard events on the cr-camera and passes the
arrow key events to the cr-picture-list (and gives it the focus).

-----

Testing

In addition to the browser test below that navigates away from and back
to the camera icon with the arrow keys, I recorded a live test [2] of
the CL on my test device in which I only used arrow keys to navigate and
made sure to navigate to the camera icon and navigate away right after
the video stream started playing. I also took photos using the keyboard
to show that the "one click photo" experience enabled by [1] was not
affected.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/914700
[2] https://drive.google.com/file/d/1ZLN750Df4kVX2ctnk35n6GFoHRF5kQ9u

Bug: 818621
Change-Id: Ica5e5bcd2a349d5c0117b76c330935120377290a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1674587
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: May Lippert <maybelle@chromium.org>
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Cr-Commit-Position: refs/heads/master@{#673103}
6 files changed