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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_tasks.cc

Issue 300063006: Files.app: Let Files.app pass mutliple files to file handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« apps/launcher.cc ('K') | « apps/launcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/chromeos/file_manager/file_tasks.h" 5 #include "chrome/browser/chromeos/file_manager/file_tasks.h"
6 6
7 #include "apps/launcher.h" 7 #include "apps/launcher.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 // Execute the task. 303 // Execute the task.
304 if (task.task_type == TASK_TYPE_FILE_BROWSER_HANDLER) { 304 if (task.task_type == TASK_TYPE_FILE_BROWSER_HANDLER) {
305 return file_browser_handlers::ExecuteFileBrowserHandler( 305 return file_browser_handlers::ExecuteFileBrowserHandler(
306 profile, 306 profile,
307 extension, 307 extension,
308 task.action_id, 308 task.action_id,
309 file_urls, 309 file_urls,
310 done); 310 done);
311 } else if (task.task_type == TASK_TYPE_FILE_HANDLER) { 311 } else if (task.task_type == TASK_TYPE_FILE_HANDLER) {
312 std::vector<base::FilePath> paths;
312 for (size_t i = 0; i != file_urls.size(); ++i) { 313 for (size_t i = 0; i != file_urls.size(); ++i) {
313 apps::LaunchPlatformAppWithFileHandler( 314 paths.push_back(file_urls[i].path());
314 profile, extension, task.action_id, file_urls[i].path());
315 } 315 }
316 316 apps::LaunchPlatformAppWithFileHandler(
317 profile, extension, task.action_id, paths);
317 if (!done.is_null()) 318 if (!done.is_null())
318 done.Run(extensions::api::file_browser_private::TASK_RESULT_MESSAGE_SENT); 319 done.Run(extensions::api::file_browser_private::TASK_RESULT_MESSAGE_SENT);
319 return true; 320 return true;
320 } 321 }
321 NOTREACHED(); 322 NOTREACHED();
322 return false; 323 return false;
323 } 324 }
324 325
325 void FindDriveAppTasks( 326 void FindDriveAppTasks(
326 const drive::DriveAppRegistry& drive_app_registry, 327 const drive::DriveAppRegistry& drive_app_registry,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 if (file_browser_handlers::IsFallbackFileBrowserHandler( 549 if (file_browser_handlers::IsFallbackFileBrowserHandler(
549 task->task_descriptor())) { 550 task->task_descriptor())) {
550 task->set_is_default(true); 551 task->set_is_default(true);
551 return; 552 return;
552 } 553 }
553 } 554 }
554 } 555 }
555 556
556 } // namespace file_tasks 557 } // namespace file_tasks
557 } // namespace file_manager 558 } // namespace file_manager
OLDNEW
« apps/launcher.cc ('K') | « apps/launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698