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

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

Issue 10918244: Files app: change action name for "Open" for hosted documents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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_tasks.js
diff --git a/chrome/browser/resources/file_manager/js/file_tasks.js b/chrome/browser/resources/file_manager/js/file_tasks.js
index e266a6d43c2a5f5e373799792017aacf2841120e..4d3c1123d2101f026962daad53af5781e1815644 100644
--- a/chrome/browser/resources/file_manager/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/js/file_tasks.js
@@ -101,12 +101,21 @@ FileTasks.prototype.processTasks_ = function(tasks) {
} else if (task_parts[1] == 'watch') {
task.iconType = 'video';
task.title = loadTimeData.getString('ACTION_WATCH');
- } else if (task_parts[1] == 'open-hosted') {
+ } else if (task_parts[1] == 'open-hosted-generic') {
if (this.urls_.length > 1)
task.iconType = 'generic';
else // Use specific icon.
task.iconType = FileType.getIcon(this.urls_[0]);
task.title = loadTimeData.getString('ACTION_OPEN');
+ } else if (task_parts[1] == 'open-hosted-gdoc') {
+ task.iconType = 'gdoc';
+ task.title = loadTimeData.getString('ACTION_OPEN_GDOC');
+ } else if (task_parts[1] == 'open-hosted-gsheet') {
+ task.iconType = 'gsheet';
+ task.title = loadTimeData.getString('ACTION_OPEN_GSHEET');
+ } else if (task_parts[1] == 'open-hosted-gslides') {
+ task.iconType = 'gslides';
+ task.title = loadTimeData.getString('ACTION_OPEN_GSLIDES');
} else if (task_parts[1] == 'view-pdf') {
// Do not render this task if disabled.
if (!loadTimeData.getBoolean('PDF_VIEW_ENABLED'))
@@ -298,7 +307,7 @@ FileTasks.prototype.executeInternalTask_ = function(id, urls) {
}
if (id == 'view-pdf' || id == 'view-in-browser' ||
- id == 'install-crx' || id == 'open-hosted' || id == 'watch') {
+ id == 'install-crx' || id.match(/^open-hosted-/) || id == 'watch') {
chrome.fileBrowserPrivate.viewFiles(urls, id, function(success) {
if (!success)
console.error('chrome.fileBrowserPrivate.viewFiles failed', urls);
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_private_api.cc ('k') | chrome/browser/resources/file_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698