| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
| 7 | 7 |
| 8 #include "bin/file_system_watcher.h" | 8 #include "bin/file_system_watcher.h" |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 context.info = reinterpret_cast<void*>(node); | 106 context.info = reinterpret_cast<void*>(node); |
| 107 CFArrayRef array = CFArrayCreate( | 107 CFArrayRef array = CFArrayCreate( |
| 108 NULL, reinterpret_cast<const void**>(&node->path_ref_), 1, NULL); | 108 NULL, reinterpret_cast<const void**>(&node->path_ref_), 1, NULL); |
| 109 FSEventStreamRef ref = FSEventStreamCreate( | 109 FSEventStreamRef ref = FSEventStreamCreate( |
| 110 NULL, | 110 NULL, |
| 111 Callback, | 111 Callback, |
| 112 &context, | 112 &context, |
| 113 array, | 113 array, |
| 114 kFSEventStreamEventIdSinceNow, | 114 kFSEventStreamEventIdSinceNow, |
| 115 0.10, | 115 0.10, |
| 116 kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagFileEvents); | 116 kFSEventStreamCreateFlagFileEvents); |
| 117 CFRelease(array); | 117 CFRelease(array); |
| 118 | 118 |
| 119 node->set_ref(ref); | 119 node->set_ref(ref); |
| 120 | 120 |
| 121 FSEventStreamScheduleWithRunLoop( | 121 FSEventStreamScheduleWithRunLoop( |
| 122 node->ref_, | 122 node->ref_, |
| 123 node->watcher_->run_loop_, | 123 node->watcher_->run_loop_, |
| 124 kCFRunLoopDefaultMode); | 124 kCFRunLoopDefaultMode); |
| 125 | 125 |
| 126 FSEventStreamStart(node->ref_); | 126 FSEventStreamStart(node->ref_); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 } | 388 } |
| 389 return events; | 389 return events; |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace bin | 392 } // namespace bin |
| 393 } // namespace dart | 393 } // namespace dart |
| 394 | 394 |
| 395 #endif // defined(TARGET_OS_MACOS) | 395 #endif // defined(TARGET_OS_MACOS) |
| 396 | 396 |
| 397 | 397 |
| OLD | NEW |