blob: db23dee7d2b84b26538985df525cad756a1a79b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
<include src="../../../../third_party/polymer/platform/platform.js">
<include src="../../../../third_party/polymer/polymer/polymer.js">
// Define the file-systems element.
Polymer('file-systems', {
ready: function() {
},
/**
* List of provided file system information maps.
* @type {Array.<Object>}
*/
model: []
});
/*
* Updates the mounted file system list.
* @param {Object} fileSystems Dictionary containing provided file system
* information.
*
*/
function updateFileSystems(fileSystems) {
var mountedFileSystems = document.querySelector('#mounted-file-systems');
mountedFileSystems.model = fileSystems;
Platform.performMicrotaskCheckpoint();
}
document.addEventListener('DOMContentLoaded', function() {
chrome.send('updateFileSystems');
// Refresh periodically.
setInterval(function() {
chrome.send('updateFileSystems');
}, 1000);
});
|