summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/file_manager/js/main.js
blob: cd2f9780c72cb28e79984c3e80d9bbb002db6580 (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
// Copyright (c) 2011 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.

/**
 * Global fileManager reference useful for poking at from the console.
 */
var fileManager;

/**
 * Kick off the file manager dialog.
 *
 * Called by main.html after the dom has been parsed.
 */
function init() {
  function onFileSystemFound(filesystem) {
    FileManager.initStrings(function () {
      fileManager = new FileManager(document.body, filesystem);
    });
  };

  util.installFileErrorToString();

  chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound);
}