fix devtools workspace api to accept file path

This commit is contained in:
Robo 2015-07-24 15:13:36 +05:30
parent bd6019ba0d
commit e9da74e58a
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) {}
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

View file

@ -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(