Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: chrome/browser/devtools/devtools_file_watcher.h

Issue 1422463007: DevTools: use inotify to pick changes on the filesystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12
13 namespace base {
14 class FilePath;
15 class FilePathWatcher;
16 }
17
18 class DevToolsFileWatcher {
19 public:
20 using WatchCallback = base::Callback<void(const std::vector<std::string>&)>;
21 explicit DevToolsFileWatcher(const WatchCallback& callback);
22 ~DevToolsFileWatcher();
23
24 void AddWatch(const base::FilePath& path);
25 void RemoveWatch(const base::FilePath& path);
26
27 private:
28 class SharedFileWatcher;
29 static SharedFileWatcher* s_shared_watcher_;
30
31 void InitSharedWatcher();
32 void FileChanged(const base::FilePath&, int);
33
34 scoped_refptr<SharedFileWatcher> shared_watcher_;
35 WatchCallback callback_;
36 DISALLOW_COPY_AND_ASSIGN(DevToolsFileWatcher);
37 };
38
39 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_file_helper.cc ('k') | chrome/browser/devtools/devtools_file_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698