summaryrefslogtreecommitdiffstats
path: root/content/renderer/devtools/devtools_client.cc
diff options
context:
space:
mode:
authorvsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-05 16:19:11 +0000
committervsevik@chromium.org <vsevik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-05 16:19:11 +0000
commit200bd3334841949daed91a7c04f74215c2ef9135 (patch)
tree2d8e3ecbc3645772ad1af6a910c138654f1fdc7d /content/renderer/devtools/devtools_client.cc
parentb11961e542a5702c4f25209affe3dc335edff6dd (diff)
downloadchromium_src-200bd3334841949daed91a7c04f74215c2ef9135.zip
chromium_src-200bd3334841949daed91a7c04f74215c2ef9135.tar.gz
chromium_src-200bd3334841949daed91a7c04f74215c2ef9135.tar.bz2
DevTools: Support workspace files indexing in browser process.
This patch introduces a trigram based index for file system folders added to DevTools. Three methods are added to the interface between DevTools frontend and browser process: - IndexPath() performs indexing of the file system folder - SearchInPath() performs search in the index - StopIndexing() stops the indexing. This is needed because indexing is time consuming (seconds or even tens of seconds on huge folders). The trigram based index is essentially a map from trigram to a list of files. The search method returns a list of files matching all trigrams that are present in the search query. BUG=263313 R=pfeldman@chromium.org Review URL: https://chromiumcodereview.appspot.com/19851007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/devtools/devtools_client.cc')
-rw-r--r--content/renderer/devtools/devtools_client.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/content/renderer/devtools/devtools_client.cc b/content/renderer/devtools/devtools_client.cc
index 3b463e3..3530081a 100644
--- a/content/renderer/devtools/devtools_client.cc
+++ b/content/renderer/devtools/devtools_client.cc
@@ -104,9 +104,26 @@ void DevToolsClient::addFileSystem() {
Send(new DevToolsHostMsg_AddFileSystem(routing_id()));
}
-void DevToolsClient::removeFileSystem(const WebString& fileSystemPath) {
+void DevToolsClient::removeFileSystem(const WebString& file_system_path) {
Send(new DevToolsHostMsg_RemoveFileSystem(routing_id(),
- fileSystemPath.utf8()));
+ file_system_path.utf8()));
+}
+
+void DevToolsClient::indexPath(int request_id,
+ const WebKit::WebString& file_system_path) {
+ Send(new DevToolsHostMsg_IndexPath(
+ routing_id(), request_id, file_system_path.utf8()));
+}
+
+void DevToolsClient::stopIndexing(int request_id) {
+ Send(new DevToolsHostMsg_StopIndexing(routing_id(), request_id));
+}
+
+void DevToolsClient::searchInPath(int request_id,
+ const WebKit::WebString& file_system_path,
+ const WebKit::WebString& query) {
+ Send(new DevToolsHostMsg_SearchInPath(
+ routing_id(), request_id, file_system_path.utf8(), query.utf8()));
}
bool DevToolsClient::isUnderTest() {