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

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

Issue 215103003: [Files.app] Hide video-player related task menu according to condition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adressed the comment Created 6 years, 9 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/foreground/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
index 63e460ee8b81d753eb049763233266cf0f154340..8dd1473f9deae52dfbb0e364b2e797a42c8cbf3d 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -46,6 +46,14 @@ FileTasks.CHROME_WEB_STORE_URL = 'https://chrome.google.com/webstore';
FileTasks.WEB_STORE_HANDLER_BASE_URL =
'https://chrome.google.com/webstore/category/collection/file_handlers';
+
+/**
+ * The app ID of the video player app.
+ * @const
+ * @type {string}
+ */
+FileTasks.VIDEO_PLAYER_ID = 'jcgeabjmjgoblfofpppfkcoakmfobdko';
+
/**
* Returns URL of the Chrome Web Store which show apps supporting the given
* file-extension and mime-type.
@@ -189,7 +197,8 @@ FileTasks.isInternalTask_ = function(taskId) {
taskType === 'file' &&
(actionId === 'play' ||
actionId === 'mount-archive' ||
- actionId === 'gallery'));
+ actionId === 'gallery' ||
+ actionId === 'gallery-video'));
};
/**
@@ -231,7 +240,8 @@ FileTasks.prototype.processTasks_ = function(tasks) {
} else if (taskParts[2] === 'mount-archive') {
task.iconType = 'archive';
task.title = loadTimeData.getString('MOUNT_ARCHIVE');
- } else if (taskParts[2] === 'gallery') {
+ } else if (taskParts[2] === 'gallery' ||
+ taskParts[2] === 'gallery-video') {
task.iconType = 'image';
task.title = loadTimeData.getString('ACTION_OPEN');
} else if (taskParts[2] === 'open-hosted-generic') {
@@ -552,7 +562,7 @@ FileTasks.prototype.executeInternalTask_ = function(id, entries) {
return;
}
- if (id === 'gallery') {
+ if (id === 'gallery' || id === 'gallery-video') {
this.openGalleryInternal_(entries);
return;
}

Powered by Google App Engine
This is Rietveld 408576698