Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: chrome/browser/resources/file_manager/js/main.js

Issue 7550035: Revert 95621 - Keeping the current directory in URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium 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 /** 5 /**
6 * Global fileManager reference useful for poking at from the console. 6 * Global fileManager reference useful for poking at from the console.
7 */ 7 */
8 var fileManager; 8 var fileManager;
9 9
10 /** 10 /**
11 * Kick off the file manager dialog. 11 * Kick off the file manager dialog.
12 * 12 *
13 * Called by main.html after the dom has been parsed. 13 * Called by main.html after the dom has been parsed.
14 */ 14 */
15 function init() { 15 function init() {
16 var params;
17
16 var rootPaths = ['Downloads', 'removable', 'archive', 'tmp']; 18 var rootPaths = ['Downloads', 'removable', 'archive', 'tmp'];
17 19
20 if (document.location.search) {
21 var json = decodeURIComponent(document.location.search.substr(1));
22 var params = JSON.parse(json);
23 console.log('params: ' + JSON.stringify(params));
24 }
25
18 function onEntriesFound(filesystem, entries) { 26 function onEntriesFound(filesystem, entries) {
19 FileManager.initStrings(function () { 27 FileManager.initStrings(function () {
20 fileManager = new FileManager(document.body, filesystem, entries); 28 fileManager = new FileManager(document.body, filesystem, entries, params);
21 // We're ready to run. Tests can monitor for this state with 29 // We're ready to run. Tests can monitor for this state with
22 // ExtensionTestMessageListener listener("ready"); 30 // ExtensionTestMessageListener listener("ready");
23 // ASSERT_TRUE(listener.WaitUntilSatisfied()); 31 // ASSERT_TRUE(listener.WaitUntilSatisfied());
24 chrome.test.sendMessage('ready'); 32 chrome.test.sendMessage('ready');
25 }); 33 });
26 } 34 }
27 35
28 function onFileSystemFound(filesystem) { 36 function onFileSystemFound(filesystem) {
29 console.log('Found filesystem: ' + filesystem.name, filesystem); 37 console.log('Found filesystem: ' + filesystem.name, filesystem);
30 38
(...skipping 19 matching lines...) Expand all
50 } else { 58 } else {
51 util.forEachDirEntry(filesystem.root, onEntryFound); 59 util.forEachDirEntry(filesystem.root, onEntryFound);
52 } 60 }
53 }; 61 };
54 62
55 util.installFileErrorToString(); 63 util.installFileErrorToString();
56 64
57 console.log('Requesting filesystem.'); 65 console.log('Requesting filesystem.');
58 chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound); 66 chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound);
59 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698