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