OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 <include src="../../../../third_party/polymer/platform/platform.js"> | |
6 <include src="../../../../third_party/polymer/polymer/polymer.js"> | |
7 | |
8 // Define the file-systems element. | |
9 Polymer('file-systems', { | |
10 ready: function() { | |
11 }, | |
12 | |
13 /** | |
14 * List of provided file system information maps. | |
15 * @type {Array.<Object>} | |
16 */ | |
17 model: [] | |
18 }); | |
19 | |
20 /* | |
21 * Updates the mounted file system list. | |
22 * @param {Object} fileSystems Dictionary containing provided file system | |
23 * information. | |
24 * | |
25 */ | |
26 function updateFileSystems(fileSystems) { | |
27 var mountedFileSystems = document.querySelector('#mounted-file-systems'); | |
28 mountedFileSystems.model = fileSystems; | |
29 Platform.performMicrotaskCheckpoint(); | |
30 } | |
31 | |
32 document.addEventListener('DOMContentLoaded', function() { | |
33 chrome.send('updateFileSystems'); | |
34 | |
35 // Refresh periodically. | |
36 setInterval(function() { | |
37 chrome.send('updateFileSystems'); | |
38 }, 1000); | |
39 }); | |
OLD | NEW |