Make touch-action apply to double-tap zoom
[chromium-blink-merge.git] / base / files / file_path_watcher.cc
blob49e0a237f69a71680e8611b97bdd34f379874ef0
1 // Copyright (c) 2011 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.
5 // Cross platform methods for FilePathWatcher. See the various platform
6 // specific implementation files, too.
8 #include "base/files/file_path_watcher.h"
10 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h"
13 namespace base {
15 FilePathWatcher::~FilePathWatcher() {
16 impl_->Cancel();
19 // static
20 void FilePathWatcher::CancelWatch(
21 const scoped_refptr<PlatformDelegate>& delegate) {
22 delegate->CancelOnMessageLoopThread();
25 FilePathWatcher::PlatformDelegate::PlatformDelegate(): cancelled_(false) {
28 FilePathWatcher::PlatformDelegate::~PlatformDelegate() {
29 DCHECK(is_cancelled());
32 bool FilePathWatcher::Watch(const FilePath& path,
33 bool recursive,
34 const Callback& callback) {
35 DCHECK(path.IsAbsolute());
36 return impl_->Watch(path, recursive, callback);
39 } // namespace base