Chromium Code Reviews| 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 crushes a few of browser tests (they wonder |
|
zel
2011/04/23 07:42:46
typo: "crashes"
also, the tests are not angry any
serya%chromium.org
2011/04/23 08:34:13
Done.
|
| + // 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); |
| } |