Chromium Code Reviews| 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 #include "bin/file_system_watcher.h" |
| 7 | 7 |
| 8 #include "bin/file_system_watcher.h" | 8 #if defined(TARGET_OS_MACOS) && !defined(TARGET_OS_IOS) |
|
Ivan Posva
2015/06/09 21:20:03
This will not work on the regular Dart builds as t
| |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| 11 #include <fcntl.h> // NOLINT | 11 #include <fcntl.h> // NOLINT |
| 12 #include <unistd.h> // NOLINT | 12 #include <unistd.h> // NOLINT |
| 13 #include <CoreServices/CoreServices.h> // NOLINT | 13 #include <CoreServices/CoreServices.h> // NOLINT |
| 14 | 14 |
| 15 #include "bin/eventhandler.h" | 15 #include "bin/eventhandler.h" |
| 16 #include "bin/fdutils.h" | 16 #include "bin/fdutils.h" |
| 17 #include "bin/file.h" | 17 #include "bin/file.h" |
| 18 #include "bin/socket.h" | 18 #include "bin/socket.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id)); | 386 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id)); |
| 387 Dart_ListSetAt(events, i, event); | 387 Dart_ListSetAt(events, i, event); |
| 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 | |
| 397 #if defined(TARGET_OS_IOS) | |
| 398 | |
| 399 namespace dart { | |
| 400 namespace bin { | |
| 401 | |
| 402 // FSEvents are unavailable on iOS. Stub out related methods | |
| 403 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { | |
| 404 return DartUtils::NewDartOSError(); | |
| 405 } | |
| 406 | |
| 407 intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) { | |
| 408 return -1; | |
| 409 } | |
| 410 | |
| 411 bool FileSystemWatcher::IsSupported() { | |
| 412 return false; | |
| 413 } | |
| 414 | |
| 415 void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) { | |
| 416 } | |
| 417 | |
| 418 intptr_t FileSystemWatcher::Init() { | |
| 419 return -1; | |
| 420 } | |
| 421 | |
| 422 void FileSystemWatcher::Close(intptr_t id) { | |
| 423 } | |
| 424 | |
| 425 intptr_t FileSystemWatcher::WatchPath(intptr_t id, | |
| 426 const char* path, | |
| 427 int events, | |
| 428 bool recursive) { | |
| 429 return -1; | |
| 430 } | |
| 431 | |
| 432 } // namespace bin | |
| 433 } // namespace dart | |
| 434 | |
| 435 #endif // defined(TARGET_OS_IOS) | |
| OLD | NEW |