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

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

Issue 10914206: [FileBrowser] Added go to gdrive menu item. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with master. 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 unified diff | Download patch | Annotate | Revision Log
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 var CommandUtil = {}; 5 var CommandUtil = {};
6 6
7 /** 7 /**
8 * Extracts root on which command event was dispatched. 8 * Extracts root on which command event was dispatched.
9 * 9 *
10 * @param {Event} event Command event for which to retrieve root to operate on. 10 * @param {Event} event Command event for which to retrieve root to operate on.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 * Clears gdata cache. 209 * Clears gdata cache.
210 */ 210 */
211 Commands.gdataClearCacheCommand = { 211 Commands.gdataClearCacheCommand = {
212 execute: function() { 212 execute: function() {
213 chrome.fileBrowserPrivate.clearDriveCache(); 213 chrome.fileBrowserPrivate.clearDriveCache();
214 }, 214 },
215 canExecute: CommandUtil.canExecuteOnGDataOnly 215 canExecute: CommandUtil.canExecuteOnGDataOnly
216 }; 216 };
217 217
218 /** 218 /**
219 * Opens drive.google.com.
220 */
221 Commands.gdataGoToDriveCommand = {
222 execute: function() {
223 window.open(FileManager.GOOGLE_DRIVE_ROOT, 'gdata-root');
224 },
225 canExecute: CommandUtil.canExecuteOnGDataOnly
226 };
227
228 /**
219 * Displays open with dialog for current selection. 229 * Displays open with dialog for current selection.
220 */ 230 */
221 Commands.openWithCommand = { 231 Commands.openWithCommand = {
222 execute: function(event, fileManager) { 232 execute: function(event, fileManager) {
223 if (fileManager.selection.tasks) { 233 if (fileManager.selection.tasks) {
224 fileManager.selection.tasks.showTaskPicker(fileManager.defaultTaskPicker, 234 fileManager.selection.tasks.showTaskPicker(fileManager.defaultTaskPicker,
225 str('OPEN_WITH_BUTTON_LABEL'), 235 str('OPEN_WITH_BUTTON_LABEL'),
226 null, 236 null,
227 function(task) { 237 function(task) {
228 this.selection.tasks.execute(task.taskId); 238 this.selection.tasks.execute(task.taskId);
229 }.bind(fileManager)); 239 }.bind(fileManager));
230 } 240 }
231 }, 241 },
232 canExecute: function(event, fileManager) { 242 canExecute: function(event, fileManager) {
233 event.canExecute = fileManager.selection.tasks && 243 event.canExecute = fileManager.selection.tasks &&
234 fileManager.selection.tasks.size() > 1; 244 fileManager.selection.tasks.size() > 1;
235 } 245 }
236 }; 246 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/resources/file_manager/js/mock_chrome.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698