Chromium Code Reviews| Index: chrome/browser/devtools/devtools_file_watcher.h |
| diff --git a/chrome/browser/devtools/devtools_file_watcher.h b/chrome/browser/devtools/devtools_file_watcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef2e17b4a60745ef65df607b1ce485866c0b1e47 |
| --- /dev/null |
| +++ b/chrome/browser/devtools/devtools_file_watcher.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_ |
| +#define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_ |
| + |
| +#include <map> |
| + |
| +#include "base/callback.h" |
| +#include "base/macros.h" |
| + |
| +namespace base { |
| +class FilePath; |
| +class FilePathWatcher; |
| +} |
| + |
| +class DevToolsFileWatcher { |
| + public: |
| + typedef base::Callback<void(const base::FilePath&, int)> WatchCallback; |
|
dgozman
2015/11/04 20:11:29
using
pfeldman
2015/11/05 00:18:42
Done.
|
| + explicit DevToolsFileWatcher(const WatchCallback& callback); |
| + ~DevToolsFileWatcher(); |
| + |
| + void AddWatch(const base::FilePath& path); |
| + void RemoveWatch(const base::FilePath& path); |
| + |
| + private: |
| + class SharedFileWatcher; |
| + static SharedFileWatcher* s_shared_watcher_; |
| + |
| + void InitSharedWatcher(); |
| + void FileChanged(const base::FilePath&, int); |
| + |
| + scoped_refptr<SharedFileWatcher> shared_watcher_; |
| + WatchCallback callback_; |
| + DISALLOW_COPY_AND_ASSIGN(DevToolsFileWatcher); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_ |