From 62f860123dc4525c68953675b16a467cff45db5a Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 4 Jun 2015 22:21:23 +0530 Subject: [PATCH] delegate filesystem request calls --- brightray/browser/inspectable_web_contents_delegate.h | 3 +++ brightray/browser/inspectable_web_contents_impl.cc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/brightray/browser/inspectable_web_contents_delegate.h b/brightray/browser/inspectable_web_contents_delegate.h index d32b139ba9..531b96e175 100644 --- a/brightray/browser/inspectable_web_contents_delegate.h +++ b/brightray/browser/inspectable_web_contents_delegate.h @@ -20,6 +20,9 @@ class InspectableWebContentsDelegate { virtual void DevToolsAppendToFile( const std::string& url, const std::string& content) {} virtual void DevToolsFocused() {} + virtual void DevToolsAddFileSystem() {} + virtual void DevToolsRemoveFileSystem( + const std::string& file_system_path) {} #if defined(USE_X11) // Called when creating devtools window. diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index bdc9f69318..27bf3dbac1 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -265,10 +265,14 @@ void InspectableWebContentsImpl::RequestFileSystems() { } void InspectableWebContentsImpl::AddFileSystem() { + if (delegate_) + delegate_->DevToolsAddFileSystem(); } void InspectableWebContentsImpl::RemoveFileSystem( const std::string& file_system_path) { + if (delegate_) + delegate_->DevToolsRemoveFileSystem(file_system_path); } void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions(