| OLD | NEW |
| 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_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 (new FileBrowserHandlerExecutor( | 483 (new FileBrowserHandlerExecutor( |
| 484 profile, extension, action_id))->Execute(file_urls, done); | 484 profile, extension, action_id))->Execute(file_urls, done); |
| 485 return true; | 485 return true; |
| 486 } | 486 } |
| 487 | 487 |
| 488 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task) { | 488 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task) { |
| 489 return ((task.task_type == file_tasks::TASK_TYPE_FILE_BROWSER_HANDLER || | 489 return ((task.task_type == file_tasks::TASK_TYPE_FILE_BROWSER_HANDLER || |
| 490 task.task_type == file_tasks::TASK_TYPE_FILE_HANDLER) && | 490 task.task_type == file_tasks::TASK_TYPE_FILE_HANDLER) && |
| 491 (task.app_id == kFileManagerAppId || | 491 (task.app_id == kFileManagerAppId || |
| 492 task.app_id == kVideoPlayerAppId || | 492 task.app_id == kVideoPlayerAppId || |
| 493 task.app_id == kGalleryAppId || |
| 493 task.app_id == extension_misc::kQuickOfficeComponentExtensionId || | 494 task.app_id == extension_misc::kQuickOfficeComponentExtensionId || |
| 494 task.app_id == extension_misc::kQuickOfficeInternalExtensionId || | 495 task.app_id == extension_misc::kQuickOfficeInternalExtensionId || |
| 495 task.app_id == extension_misc::kQuickOfficeExtensionId)); | 496 task.app_id == extension_misc::kQuickOfficeExtensionId)); |
| 496 } | 497 } |
| 497 | 498 |
| 498 FileBrowserHandlerList FindFileBrowserHandlers( | 499 FileBrowserHandlerList FindFileBrowserHandlers( |
| 499 Profile* profile, | 500 Profile* profile, |
| 500 const std::vector<GURL>& file_list) { | 501 const std::vector<GURL>& file_list) { |
| 501 FileBrowserHandlerList common_handlers; | 502 FileBrowserHandlerList common_handlers; |
| 502 for (std::vector<GURL>::const_iterator it = file_list.begin(); | 503 for (std::vector<GURL>::const_iterator it = file_list.begin(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 528 if (common_handlers.empty()) | 529 if (common_handlers.empty()) |
| 529 return FileBrowserHandlerList(); | 530 return FileBrowserHandlerList(); |
| 530 } | 531 } |
| 531 } | 532 } |
| 532 | 533 |
| 533 return common_handlers; | 534 return common_handlers; |
| 534 } | 535 } |
| 535 | 536 |
| 536 } // namespace file_browser_handlers | 537 } // namespace file_browser_handlers |
| 537 } // namespace file_manager | 538 } // namespace file_manager |
| OLD | NEW |