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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 9594037: Revert 124975 - [filebrowser] Introduce "Open" action for supported file types (e.g. pdf). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_manager.js
===================================================================
--- chrome/browser/resources/file_manager/js/file_manager.js (revision 125001)
+++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
@@ -2164,7 +2164,6 @@
FileManager.prototype.onTasksFound_ = function(selection, tasksList) {
this.taskItems_.clear();
- var tasksCount = 0;
for (var i = 0; i < tasksList.length; i++) {
var task = tasksList[i];
@@ -2186,30 +2185,15 @@
} else if (task_parts[1] == 'gallery') {
task.iconUrl =
chrome.extension.getURL('images/icon_preview_16x16.png');
- task.title = str('OPEN_ACTION');
+ task.title = str('GALLERY');
task.allTasks = tasksList;
- } else if (task_parts[1] == 'view-pdf') {
- // Do not render this task if disabled.
- if (str('PDF_VIEW_ENABLED') == 'false') continue;
- task.iconUrl =
- chrome.extension.getURL('images/icon_preview_16x16.png');
- task.title = str('OPEN_ACTION');
- } else if (task_parts[1] == 'view-txt') {
- task.iconUrl =
- chrome.extension.getURL('images/icon_preview_16x16.png');
- task.title = str('OPEN_ACTION');
- } else if (task_parts[1] == 'install-crx') {
- // TODO(dgozman): change to the right icon.
- task.iconUrl =
- chrome.extension.getURL('images/icon_preview_16x16.png');
- task.title = str('INSTALL_CRX');
+ this.galleryTask_ = task;
}
}
this.renderTaskItem_(task);
- tasksCount++;
}
- this.taskItems_.visible = tasksCount > 0;
+ this.taskItems_.visible = tasksList.length > 0;
selection.tasksList = tasksList;
if (selection.dispatchDefault) {
@@ -2461,8 +2445,6 @@
}
}
this.openGallery_(urls, noGallery);
- } else if (id == 'view-pdf' || id == 'view-txt' || id == 'install-crx') {
- chrome.fileBrowserPrivate.viewFiles(urls, 'default', function() {});
}
};
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.cc ('k') | chrome/browser/resources/file_manager/js/mock_chrome.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698