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

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

Issue 6873100: Moving slideshow to the filebrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 82643)
+++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
@@ -8,6 +8,8 @@
// TODO(rginda): Remove this when the thumbnail view is less janky.
const ENABLE_THUMBNAIL_VIEW = false;
+var g_slideshow_data = null;
+
/**
* FileManager constructor.
*
@@ -973,7 +975,20 @@
}
};
+ FileManager.prototype.getExtensionId_ = function() {
+ return chrome.extension.getURL('').split('/')[2];
+ };
+
FileManager.prototype.onTaskButtonClicked_ = function(event) {
+ // TODO(serya): This API assumes having a background page.
+ // Adding it crashes a few of browser tests (they wonder
+ // to see a new renderer process in a fresh profile).
+ if (event.srcElement.task.taskId == this.getExtensionId_() + '|preview') {
+ g_slideshow_data = this.selection.urls;
+ alert("create tab");
+ chrome.tabs.create({url: "slideshow.html"});
+ return;
+ }
chrome.fileBrowserPrivate.executeTask(event.srcElement.task.taskId,
this.selection.urls);
}
« no previous file with comments | « chrome/browser/resources/file_manager/background.html ('k') | chrome/browser/resources/file_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698