function lookupInitialZoom(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.getZoom(streamInfo.tabId, resolve);
  });
}
/**
 * Returns a promise that will resolve to the initial zoom factor
 * upon starting the plugin. This may differ from the default zoom
 * if, for example, the page is zoomed before the plugin is run.
 *
 * @param {!Object} streamInfo The stream object pointing to the data contained
 *     in the PDF.
 * @return {Promise<number>} A promise that will resolve to the initial zoom
 *     factor.
 */
Returns a promise that will resolve to the initial zoom factor
upon starting the plugin. This may differ from the default zoom
if, for example, the page is zoomed before the plugin is run.

@param {!Object} streamInfo The stream object pointing to the data contained
in the PDF.
@return {Promise} A promise that will resolve to the initial zoom
factor.
Returns a promise that will resolve to the initial zoom factor upon starting the plugin . This may differ from the default zoom if for example the page is zoomed before the plugin is run . @param { !Object } streamInfo The stream object pointing to the data contained in the PDF . @return { Promise } A promise that will resolve to the initial zoom factor .
function lookupInitialZoom(streamInfo) {
  if (!chrome.tabs || streamInfo.tabId < 0)
    return Promise.resolve(1);
  return new Promise(function(resolve, reject) {
    chrome.tabs.getZoom(streamInfo.tabId, resolve);
  });
}
function lookupInitialZoom ( streamInfo ) { if ( ! chrome . tabs || streamInfo . tabId < 0 ) return Promise . resolve ( 1 ) ; return new Promise ( function ( resolve , reject ) { chrome . tabs . getZoom ( streamInfo . tabId , resolve ) ; } ) ; }
Returns a promise that will resolve to the initial zoom factor
 upon starting the plugin.
Returns a promise that will resolve to the initial zoom factor upon starting the plugin .
// Webviews don't run in tabs so |streamInfo.tabId| is -1 when running within // a webview.