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

Unified Diff: chrome/browser/devtools/devtools_file_helper.cc

Issue 57073004: DevTools: Add support for adding folders to DevTools workspace with drag and drop (browser part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/devtools/devtools_file_helper.h ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_file_helper.cc
diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
index c1541c4a2dcfcddade558e6ac839f70b4a4e578f..b807a683f81bb90aafab3ae059a57103c70668c0 100644
--- a/chrome/browser/devtools/devtools_file_helper.cc
+++ b/chrome/browser/devtools/devtools_file_helper.cc
@@ -35,6 +35,7 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/shell_dialogs/select_file_dialog.h"
+#include "webkit/browser/fileapi/file_system_url.h"
#include "webkit/browser/fileapi/isolated_context.h"
#include "webkit/common/fileapi/file_system_util.h"
@@ -309,6 +310,28 @@ void DevToolsFileHelper::AddFileSystem(
base::FilePath());
}
+void DevToolsFileHelper::UpgradeDraggedFileSystemPermissions(
+ const std::string& file_system_url,
+ const AddFileSystemCallback& callback,
+ const ShowInfoBarCallback& show_info_bar_callback) {
+ fileapi::FileSystemURL root_url =
+ isolated_context()->CrackURL(GURL(file_system_url));
+ if (!root_url.is_valid() || !root_url.path().empty()) {
+ callback.Run(FileSystem());
+ return;
+ }
+
+ std::vector<fileapi::MountPoints::MountPointInfo> mount_points;
+ isolated_context()->GetDraggedFileInfo(root_url.filesystem_id(),
+ &mount_points);
+
+ std::vector<fileapi::MountPoints::MountPointInfo>::const_iterator it =
+ mount_points.begin();
+ for (; it != mount_points.end(); ++it) {
+ InnerAddFileSystem(callback, show_info_bar_callback, it->path);
pfeldman 2013/11/05 06:10:54 drop {}
+ }
+}
+
void DevToolsFileHelper::InnerAddFileSystem(
const AddFileSystemCallback& callback,
const ShowInfoBarCallback& show_info_bar_callback,
« no previous file with comments | « chrome/browser/devtools/devtools_file_helper.h ('k') | chrome/browser/devtools/devtools_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698