Merge pull request #128 from deepak1556/inspectable_web_contents_api_patch

fix devtools workspace api
This commit is contained in:
Cheng Zhao 2015-07-29 17:14:49 +08:00
commit 51f0485898
2 changed files with 6 additions and 4 deletions

View file

@ -14,9 +14,10 @@ class InspectableWebContentsDelegate {
const std::string& url, const std::string& content, bool save_as) {} const std::string& url, const std::string& content, bool save_as) {}
virtual void DevToolsAppendToFile( virtual void DevToolsAppendToFile(
const std::string& url, const std::string& content) {} const std::string& url, const std::string& content) {}
virtual void DevToolsAddFileSystem() {} virtual void DevToolsAddFileSystem(
const base::FilePath& file_system_path) {}
virtual void DevToolsRemoveFileSystem( virtual void DevToolsRemoveFileSystem(
const std::string& file_system_path) {} const base::FilePath& file_system_path) {}
}; };
} // namespace brightray } // namespace brightray

View file

@ -384,13 +384,14 @@ void InspectableWebContentsImpl::RequestFileSystems() {
void InspectableWebContentsImpl::AddFileSystem() { void InspectableWebContentsImpl::AddFileSystem() {
if (delegate_) if (delegate_)
delegate_->DevToolsAddFileSystem(); delegate_->DevToolsAddFileSystem(base::FilePath());
} }
void InspectableWebContentsImpl::RemoveFileSystem( void InspectableWebContentsImpl::RemoveFileSystem(
const std::string& file_system_path) { const std::string& file_system_path) {
if (delegate_) if (delegate_)
delegate_->DevToolsRemoveFileSystem(file_system_path); delegate_->DevToolsRemoveFileSystem(
base::FilePath::FromUTF8Unsafe(file_system_path));
} }
void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions( void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions(