function lookupDefaultZoom(streamInfo) {
  // Webviews don't run in tabs so |streamInfo.tabId| is -1 when running within
  // a webview.
  if (!chrome.tabs || streamInfo.tabId < 0)
    return Promise.resolve(1);

  return new Promise(function(resolve, reject) {
    chrome.tabs.getZoomSettings(streamInfo.tabId, function(zoomSettings) {
      resolve(zoomSettings.defaultZoomFactor);
    });
  });
}
/**
 * @param {!Object} streamInfo The stream object pointing to the data contained
 *     in the PDF.
 * @return {Promise<number>} A promise that will resolve to the default zoom
 *     factor.
 */
@param {!Object} streamInfo The stream object pointing to the data contained
in the PDF.
@return {Promise} A promise that will resolve to the default zoom
factor.
@param { !Object } streamInfo The stream object pointing to the data contained in the PDF . @return { Promise } A promise that will resolve to the default zoom factor .
function lookupDefaultZoom(streamInfo) {
  if (!chrome.tabs || streamInfo.tabId < 0)
    return Promise.resolve(1);
  return new Promise(function(resolve, reject) {
    chrome.tabs.getZoomSettings(streamInfo.tabId, function(zoomSettings) {
      resolve(zoomSettings.defaultZoomFactor);
    });
  });
}
function lookupDefaultZoom ( streamInfo ) { if ( ! chrome . tabs || streamInfo . tabId < 0 ) return Promise . resolve ( 1 ) ; return new Promise ( function ( resolve , reject ) { chrome . tabs . getZoomSettings ( streamInfo . tabId , function ( zoomSettings ) { resolve ( zoomSettings . defaultZoomFactor ) ; } ) ; } ) ; }
@param {!Object} streamInfo The stream object pointing to the data contained
     in the PDF.
@param { !Object } streamInfo The stream object pointing to the data contained in the PDF .
// Webviews don't run in tabs so |streamInfo.tabId| is -1 when running within // a webview.