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

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

Issue 10083067: gdata: Support opening zip file on Google Docs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gdata: Support opening zip file on Google Docs. Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 var position = 0; 2729 var position = 0;
2730 if (urls.length == 1) { 2730 if (urls.length == 1) {
2731 // If just a single audio file is selected pass along every audio file 2731 // If just a single audio file is selected pass along every audio file
2732 // in the directory. 2732 // in the directory.
2733 var selectedUrl = urls[0]; 2733 var selectedUrl = urls[0];
2734 urls = this.getAllUrlsInCurrentDirectory_().filter(FileType.isAudio); 2734 urls = this.getAllUrlsInCurrentDirectory_().filter(FileType.isAudio);
2735 position = urls.indexOf(selectedUrl); 2735 position = urls.indexOf(selectedUrl);
2736 } 2736 }
2737 chrome.mediaPlayerPrivate.play(urls, position); 2737 chrome.mediaPlayerPrivate.play(urls, position);
2738 } else if (id == 'mount-archive') { 2738 } else if (id == 'mount-archive') {
2739 for (var index = 0; index < urls.length; ++index) { 2739 var self = this;
2740 // Url in MountCompleted event won't be escaped, so let's make sure 2740 this.resolveSelectResults_(urls, function(urls) {
2741 // we don't use escaped one in mountRequests_. 2741 for (var index = 0; index < urls.length; ++index) {
2742 var unescapedUrl = unescape(urls[index]); 2742 // Url in MountCompleted event won't be escaped, so let's make sure
2743 this.mountRequests_.push(unescapedUrl); 2743 // we don't use escaped one in mountRequests_.
2744 chrome.fileBrowserPrivate.addMount(unescapedUrl, 'file', {}); 2744 var unescapedUrl = unescape(urls[index]);
2745 } 2745 self.mountRequests_.push(unescapedUrl);
2746 chrome.fileBrowserPrivate.addMount(unescapedUrl, 'file', {});
2747 }
2748 });
2746 } else if (id == 'format-device') { 2749 } else if (id == 'format-device') {
2747 this.confirm.show(str('FORMATTING_WARNING'), function() { 2750 this.confirm.show(str('FORMATTING_WARNING'), function() {
2748 chrome.fileBrowserPrivate.formatDevice(urls[0]); 2751 chrome.fileBrowserPrivate.formatDevice(urls[0]);
2749 }); 2752 });
2750 } else if (id == 'gallery') { 2753 } else if (id == 'gallery') {
2751 this.openGallery_(urls); 2754 this.openGallery_(urls);
2752 } else if (id == 'view-pdf' || id == 'view-in-browser' || 2755 } else if (id == 'view-pdf' || id == 'view-in-browser' ||
2753 id == 'install-crx' || id == 'open-hosted') { 2756 id == 'install-crx' || id == 'open-hosted') {
2754 chrome.fileBrowserPrivate.viewFiles(urls, 'default', function(success) { 2757 chrome.fileBrowserPrivate.viewFiles(urls, 'default', function(success) {
2755 if (!success) 2758 if (!success)
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
4322 4325
4323 handleSplitterDragEnd: function(e) { 4326 handleSplitterDragEnd: function(e) {
4324 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments); 4327 Splitter.prototype.handleSplitterDragEnd.apply(this, arguments);
4325 this.ownerDocument.documentElement.classList.remove('col-resize'); 4328 this.ownerDocument.documentElement.classList.remove('col-resize');
4326 } 4329 }
4327 }; 4330 };
4328 4331
4329 customSplitter.decorate(splitterElement); 4332 customSplitter.decorate(splitterElement);
4330 }; 4333 };
4331 })(); 4334 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698