function IFrameMessageSender(iframe) {
  if (!iframe) {
    console.error('No iframe specified');
    return;
  }
  this.iframe = iframe;

  // On iOS, if the iframe is across domains, also send DeviceMotion data.
  if (this.isIOS_()) {
    window.addEventListener('devicemotion', this.onDeviceMotion_.bind(this), false);
  }
}
Sends events to the embedded VR view IFrame via postMessage. Also handles
messages sent back from the IFrame:

   click: When a hotspot was clicked.
   modechange: When the user changes viewing mode (VR|Fullscreen|etc).