| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium OS Authors. All rights reserved. | 1 // Copyright 2014 The Chromium OS 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 // Event called on opening a file with the extension or mime type | 7 // Event called on opening a file with the extension or mime type | 
| 8 // declared in the manifest file. | 8 // declared in the manifest file. | 
| 9 chrome.app.runtime.onLaunched.addListener(unpacker.app.onLaunched); | 9 chrome.app.runtime.onLaunched.addListener(unpacker.app.onLaunched); | 
| 10 | 10 | 
| 11 // Save the state before suspending the event page, so we can resume it | 11 // Save the state before suspending the event page, so we can resume it | 
| 12 // once new events arrive. | 12 // once new events arrive. | 
| 13 chrome.runtime.onSuspend.addListener(unpacker.app.onSuspend); | 13 chrome.runtime.onSuspend.addListener(unpacker.app.onSuspend); | 
| 14 | 14 | 
| 15 chrome.fileSystemProvider.onUnmountRequested.addListener( | 15 chrome.fileSystemProvider.onUnmountRequested.addListener( | 
| 16     unpacker.app.onUnmountRequested); | 16     unpacker.app.onUnmountRequested); | 
| 17 chrome.fileSystemProvider.onGetMetadataRequested.addListener( | 17 chrome.fileSystemProvider.onGetMetadataRequested.addListener( | 
| 18     unpacker.app.onGetMetadataRequested); | 18     unpacker.app.onGetMetadataRequested); | 
| 19 chrome.fileSystemProvider.onReadDirectoryRequested.addListener( | 19 chrome.fileSystemProvider.onReadDirectoryRequested.addListener( | 
| 20     unpacker.app.onReadDirectoryRequested); | 20     unpacker.app.onReadDirectoryRequested); | 
| 21 chrome.fileSystemProvider.onOpenFileRequested.addListener( | 21 chrome.fileSystemProvider.onOpenFileRequested.addListener( | 
| 22     unpacker.app.onOpenFileRequested); | 22     unpacker.app.onOpenFileRequested); | 
| 23 chrome.fileSystemProvider.onCloseFileRequested.addListener( | 23 chrome.fileSystemProvider.onCloseFileRequested.addListener( | 
| 24     unpacker.app.onCloseFileRequested); | 24     unpacker.app.onCloseFileRequested); | 
| 25 chrome.fileSystemProvider.onReadFileRequested.addListener( | 25 chrome.fileSystemProvider.onReadFileRequested.addListener( | 
| 26     unpacker.app.onReadFileRequested); | 26     unpacker.app.onReadFileRequested); | 
| 27 | 27 | 
| 28 // Load the PNaCl module. | 28 // Load the PNaCl module. | 
| 29 unpacker.app.loadNaclModule('module.nmf', 'application/x-pnacl'); | 29 unpacker.app.loadNaclModule('module.nmf.txt', 'application/x-pnacl'); | 
| OLD | NEW | 
|---|