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

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

Issue 18024002: Add the new window item to the Files.app's context menu on the launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments + fixed. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_manager_commands.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager_commands.js b/chrome/browser/resources/file_manager/js/file_manager_commands.js
index a614b6248045ebceae1f406743b810ff00e9c385..b6d47cfa632d0cac606861355dfa1eb02e172362 100644
--- a/chrome/browser/resources/file_manager/js/file_manager_commands.js
+++ b/chrome/browser/resources/file_manager/js/file_manager_commands.js
@@ -257,8 +257,13 @@ Commands.newFolderCommand = {
* Initiates new window creation.
*/
Commands.newWindowCommand = {
- execute: function(event, fileManager) {
- chrome.fileBrowserPrivate.openNewWindow(document.location.href);
+ execute: function(event, fileManager, directoryModel) {
+ chrome.runtime.getBackgroundPage(function(background) {
+ var appState = {
+ defaultPath: directoryModel.getCurrentDirPath()
+ };
+ background.launchFileManager(appState);
+ });
},
canExecute: function(event, fileManager) {
event.canExecute = (fileManager.dialogType == DialogType.FULL_PAGE);
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/resources/file_manager/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698