Restrict Device{Orientation|Motion}Events to secure origins.

Registering event handlers to `devicemotion`, `deviceorientation`,
and `deviceorientationabsolute` events is still possible, but the
handlers will never be invoked in non-secure browsing contexts.

The following, related, interfaces are marked as [SecureContext]:
  -- DeviceOrientationEvent,
  -- DeviceMotionEvent,
  -- DeviceMotionEventAcceleration,
  -- DeviceMotionEventRotationRate.

The change is gated on RestrictDeviceSensorEventsToSecureContexts,
which is disabled by default, so this CL is a no-op unless the
base::Feature with the same name is manually enabled.

Intent to remove: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5yqfAXibz1I

Bug: 932078
Change-Id: I9baaafd1f4483f121feadc054650c4d510a2c88d
TBR: haraken@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1473992
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634620}
29 files changed