| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Global PDFViewer object, accessible for testing. | 8 * Global PDFViewer object, accessible for testing. |
| 9 * @type Object | 9 * @type Object |
| 10 */ | 10 */ |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 /** | 42 /** |
| 43 * Entrypoint for starting the PDF viewer. This function obtains the browser | 43 * Entrypoint for starting the PDF viewer. This function obtains the browser |
| 44 * API for the PDF and constructs a PDFViewer object with it. | 44 * API for the PDF and constructs a PDFViewer object with it. |
| 45 */ | 45 */ |
| 46 function main() { | 46 function main() { |
| 47 // Set up an event listener to catch scripting messages which are sent prior | 47 // Set up an event listener to catch scripting messages which are sent prior |
| 48 // to the PDFViewer being created. | 48 // to the PDFViewer being created. |
| 49 window.addEventListener('message', handleScriptingMessage, false); | 49 window.addEventListener('message', handleScriptingMessage, false); |
| 50 | 50 |
| 51 createBrowserApi().then(initViewer); | 51 createBrowserApi().then(initViewer); |
| 52 }; | 52 } |
| 53 | 53 |
| 54 main(); | 54 main(); |
| 55 })(); | 55 })(); |
| OLD | NEW |