| 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 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 4 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 const Extension* extension = | 463 const Extension* extension = |
| 464 service->GetExtensionById(kFileBrowserDomain, false); | 464 service->GetExtensionById(kFileBrowserDomain, false); |
| 465 if (!extension) | 465 if (!extension) |
| 466 return; | 466 return; |
| 467 | 467 |
| 468 extension_misc::LaunchContainer launch_container = | 468 extension_misc::LaunchContainer launch_container = |
| 469 service->extension_prefs()-> | 469 service->extension_prefs()-> |
| 470 GetLaunchContainer(extension, ExtensionPrefs::LAUNCH_DEFAULT); | 470 GetLaunchContainer(extension, ExtensionPrefs::LAUNCH_DEFAULT); |
| 471 | 471 |
| 472 content::RecordAction(UserMetricsAction("ShowFileBrowserFullTab")); | 472 content::RecordAction(UserMetricsAction("ShowFileBrowserFullTab")); |
| 473 Browser::OpenApplication( | 473 Browser::OpenApplication(profile, extension, launch_container, |
| 474 profile, extension, launch_container, GURL(url), NEW_FOREGROUND_TAB); | 474 GURL(url), NEW_FOREGROUND_TAB, NULL); |
| 475 } | 475 } |
| 476 | 476 |
| 477 void ViewRemovableDrive(const FilePath& path) { | 477 void ViewRemovableDrive(const FilePath& path) { |
| 478 OpenFileBrowser(path, REUSE_ANY_FILE_MANAGER, "mountTriggered"); | 478 OpenFileBrowser(path, REUSE_ANY_FILE_MANAGER, "mountTriggered"); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void ShowFileInFolder(const FilePath& path) { | 481 void ShowFileInFolder(const FilePath& path) { |
| 482 // This action changes the selection so we do not reuse existing tabs. | 482 // This action changes the selection so we do not reuse existing tabs. |
| 483 OpenFileBrowser(path, REUSE_NEVER, "selectOnly"); | 483 OpenFileBrowser(path, REUSE_NEVER, "selectOnly"); |
| 484 } | 484 } |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 GDataOperationRegistry::ProgressStatus>::const_iterator iter = | 723 GDataOperationRegistry::ProgressStatus>::const_iterator iter = |
| 724 list.begin(); | 724 list.begin(); |
| 725 iter != list.end(); ++iter) { | 725 iter != list.end(); ++iter) { |
| 726 result_list->Append( | 726 result_list->Append( |
| 727 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); | 727 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); |
| 728 } | 728 } |
| 729 return result_list.release(); | 729 return result_list.release(); |
| 730 } | 730 } |
| 731 | 731 |
| 732 } // namespace file_manager_util | 732 } // namespace file_manager_util |
| OLD | NEW |