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

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

Issue 10782028: Merge 142938 - [File Manager] Avoiding confusion between "Watch" and "Open" actions for video files (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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/chromeos/extensions/file_manager_util.h ('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) 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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 // TODO(serya): This hack needed until task.iconUrl is working 2523 // TODO(serya): This hack needed until task.iconUrl is working
2524 // (see GetFileTasksFileBrowserFunction::RunImpl). 2524 // (see GetFileTasksFileBrowserFunction::RunImpl).
2525 task.iconUrl = 2525 task.iconUrl =
2526 chrome.extension.getURL('images/filetype_audio.png'); 2526 chrome.extension.getURL('images/filetype_audio.png');
2527 task.title = str('ACTION_LISTEN'); 2527 task.title = str('ACTION_LISTEN');
2528 } else if (task_parts[1] == 'mount-archive') { 2528 } else if (task_parts[1] == 'mount-archive') {
2529 task.iconUrl = 2529 task.iconUrl =
2530 chrome.extension.getURL('images/filetype_archive.png'); 2530 chrome.extension.getURL('images/filetype_archive.png');
2531 task.title = str('MOUNT_ARCHIVE'); 2531 task.title = str('MOUNT_ARCHIVE');
2532 } else if (task_parts[1] == 'gallery') { 2532 } else if (task_parts[1] == 'gallery') {
2533 // If a single video is selected the Gallery is redundant.
2534 if (selection.urls.length == 1 && FileType.isVideo(selection.urls[0]))
2535 continue;
2536 task.title = str('ACTION_OPEN'); 2533 task.title = str('ACTION_OPEN');
2537 task.iconUrl = 2534 task.iconUrl =
2538 chrome.extension.getURL('images/filetype_image.png'); 2535 chrome.extension.getURL('images/filetype_image.png');
2539 } else if (task_parts[1] == 'watch') { 2536 } else if (task_parts[1] == 'watch') {
2540 // Hide "Watch" action for multiple selection.
2541 if (selection.urls.length > 1)
2542 continue;
2543 task.iconUrl = 2537 task.iconUrl =
2544 chrome.extension.getURL('images/filetype_video.png'); 2538 chrome.extension.getURL('images/filetype_video.png');
2545 task.title = str('ACTION_WATCH'); 2539 task.title = str('ACTION_WATCH');
2546 } else if (task_parts[1] == 'open-hosted') { 2540 } else if (task_parts[1] == 'open-hosted') {
2547 if (selection.urls.length > 1) { 2541 if (selection.urls.length > 1) {
2548 task.iconUrl = 2542 task.iconUrl =
2549 chrome.extension.getURL('images/filetype_generic.png'); 2543 chrome.extension.getURL('images/filetype_generic.png');
2550 } else { 2544 } else {
2551 // Use specific icon. 2545 // Use specific icon.
2552 var icon = FileType.getIcon(selection.urls[0]); 2546 var icon = FileType.getIcon(selection.urls[0]);
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
4586 function closeBanner() { 4580 function closeBanner() {
4587 self.cleanupGDataWelcome_(); 4581 self.cleanupGDataWelcome_();
4588 // Stop showing the welcome banner. 4582 // Stop showing the welcome banner.
4589 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; 4583 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT;
4590 } 4584 }
4591 4585
4592 return maybeShowBanner; 4586 return maybeShowBanner;
4593 }; 4587 };
4594 })(); 4588 })();
4595 4589
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698