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

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

Issue 10556041: [File Manager] Avoiding confusion between "Watch" and "Open" actions for video files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
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 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 // TODO(serya): This hack needed until task.iconUrl is working 2520 // TODO(serya): This hack needed until task.iconUrl is working
2521 // (see GetFileTasksFileBrowserFunction::RunImpl). 2521 // (see GetFileTasksFileBrowserFunction::RunImpl).
2522 task.iconUrl = 2522 task.iconUrl =
2523 chrome.extension.getURL('images/filetype_audio.png'); 2523 chrome.extension.getURL('images/filetype_audio.png');
2524 task.title = str('ACTION_LISTEN'); 2524 task.title = str('ACTION_LISTEN');
2525 } else if (task_parts[1] == 'mount-archive') { 2525 } else if (task_parts[1] == 'mount-archive') {
2526 task.iconUrl = 2526 task.iconUrl =
2527 chrome.extension.getURL('images/filetype_archive.png'); 2527 chrome.extension.getURL('images/filetype_archive.png');
2528 task.title = str('MOUNT_ARCHIVE'); 2528 task.title = str('MOUNT_ARCHIVE');
2529 } else if (task_parts[1] == 'gallery') { 2529 } else if (task_parts[1] == 'gallery') {
2530 // If a single video is selected the Gallery is redundant.
2531 if (selection.urls.length == 1 && FileType.isVideo(selection.urls[0]))
2532 continue;
2533 task.title = str('ACTION_OPEN'); 2530 task.title = str('ACTION_OPEN');
2534 task.iconUrl = 2531 task.iconUrl =
2535 chrome.extension.getURL('images/filetype_image.png'); 2532 chrome.extension.getURL('images/filetype_image.png');
2536 } else if (task_parts[1] == 'watch') { 2533 } else if (task_parts[1] == 'watch') {
2537 // Hide "Watch" action for multiple selection.
2538 if (selection.urls.length > 1)
2539 continue;
2540 task.iconUrl = 2534 task.iconUrl =
2541 chrome.extension.getURL('images/filetype_video.png'); 2535 chrome.extension.getURL('images/filetype_video.png');
2542 task.title = str('ACTION_WATCH'); 2536 task.title = str('ACTION_WATCH');
2543 } else if (task_parts[1] == 'open-hosted') { 2537 } else if (task_parts[1] == 'open-hosted') {
2544 if (selection.urls.length > 1) { 2538 if (selection.urls.length > 1) {
2545 task.iconUrl = 2539 task.iconUrl =
2546 chrome.extension.getURL('images/filetype_generic.png'); 2540 chrome.extension.getURL('images/filetype_generic.png');
2547 } else { 2541 } else {
2548 // Use specific icon. 2542 // Use specific icon.
2549 var icon = FileType.getIcon(selection.urls[0]); 2543 var icon = FileType.getIcon(selection.urls[0]);
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after
4639 function closeBanner() { 4633 function closeBanner() {
4640 self.cleanupGDataWelcome_(); 4634 self.cleanupGDataWelcome_();
4641 // Stop showing the welcome banner. 4635 // Stop showing the welcome banner.
4642 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; 4636 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT;
4643 } 4637 }
4644 4638
4645 return maybeShowBanner; 4639 return maybeShowBanner;
4646 }; 4640 };
4647 })(); 4641 })();
4648 4642
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698