allow delegate to handle file system indexing requests

This commit is contained in:
deepak1556 2016-05-07 04:36:00 +05:30
parent 8e94d5ab0f
commit 2db138f2dc
2 changed files with 13 additions and 0 deletions

View file

@ -20,6 +20,13 @@ class InspectableWebContentsDelegate {
const base::FilePath& file_system_path) {}
virtual void DevToolsRemoveFileSystem(
const base::FilePath& file_system_path) {}
virtual void DevToolsIndexPath(
int request_id, const std::string& file_system_path) {}
virtual void DevToolsStopIndexing(int request_id) {}
virtual void DevToolsSearchInPath(
int request_id,
const std::string& file_system_path,
const std::string& query) {}
};
} // namespace brightray

View file

@ -459,15 +459,21 @@ void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions(
void InspectableWebContentsImpl::IndexPath(
int request_id, const std::string& file_system_path) {
if (delegate_)
delegate_->DevToolsIndexPath(request_id, file_system_path);
}
void InspectableWebContentsImpl::StopIndexing(int request_id) {
if (delegate_)
delegate_->DevToolsStopIndexing(request_id);
}
void InspectableWebContentsImpl::SearchInPath(
int request_id,
const std::string& file_system_path,
const std::string& query) {
if (delegate_)
delegate_->DevToolsSearchInPath(request_id, file_system_path, query);
}
void InspectableWebContentsImpl::SetWhitelistedShortcuts(const std::string& message) {