From e9da74e58a504c6682d340a5207a7d98069bff16 Mon Sep 17 00:00:00 2001 From: Robo Date: Fri, 24 Jul 2015 15:13:36 +0530 Subject: [PATCH] fix devtools workspace api to accept file path --- brightray/browser/inspectable_web_contents_delegate.h | 5 +++-- brightray/browser/inspectable_web_contents_impl.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/brightray/browser/inspectable_web_contents_delegate.h b/brightray/browser/inspectable_web_contents_delegate.h index 606bfa9a4e..9c4ee722c2 100644 --- a/brightray/browser/inspectable_web_contents_delegate.h +++ b/brightray/browser/inspectable_web_contents_delegate.h @@ -14,9 +14,10 @@ class InspectableWebContentsDelegate { const std::string& url, const std::string& content, bool save_as) {} virtual void DevToolsAppendToFile( const std::string& url, const std::string& content) {} - virtual void DevToolsAddFileSystem() {} + virtual void DevToolsAddFileSystem( + const base::FilePath& file_system_path) {} virtual void DevToolsRemoveFileSystem( - const std::string& file_system_path) {} + const base::FilePath& file_system_path) {} }; } // namespace brightray diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index fa62d3d202..ba566f2339 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -374,13 +374,14 @@ void InspectableWebContentsImpl::RequestFileSystems() { void InspectableWebContentsImpl::AddFileSystem() { if (delegate_) - delegate_->DevToolsAddFileSystem(); + delegate_->DevToolsAddFileSystem(base::FilePath()); } void InspectableWebContentsImpl::RemoveFileSystem( const std::string& file_system_path) { if (delegate_) - delegate_->DevToolsRemoveFileSystem(file_system_path); + delegate_->DevToolsRemoveFileSystem( + base::FilePath::FromUTF8Unsafe(file_system_path)); } void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions(