OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <cstdio> | 5 #include <cstdio> |
6 #include <cstring> | 6 #include <cstring> |
7 #include <memory> | 7 #include <memory> |
8 #include <mutex> | 8 #include <mutex> |
9 #include <set> | 9 #include <set> |
10 #include <unordered_map> | 10 #include <unordered_map> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include <sys/time.h> | 13 #include <sys/time.h> |
14 | 14 |
15 #include "mojo/public/platform/dart/dart_handle_watcher.h" | 15 #include "mojo/public/platform/dart/dart_handle_watcher.h" |
16 | 16 |
17 #include "dart/runtime/include/dart_api.h" | 17 #include "dart/runtime/include/dart_api.h" |
18 #include "dart/runtime/include/dart_native_api.h" | 18 #include "dart/runtime/include/dart_native_api.h" |
19 | 19 |
20 #include "mojo/public/c/system/functions.h" | |
21 #include "mojo/public/c/system/handle.h" | 20 #include "mojo/public/c/system/handle.h" |
22 #include "mojo/public/c/system/message_pipe.h" | 21 #include "mojo/public/c/system/message_pipe.h" |
23 #include "mojo/public/c/system/result.h" | 22 #include "mojo/public/c/system/result.h" |
24 #include "mojo/public/c/system/types.h" | 23 #include "mojo/public/c/system/time.h" |
| 24 #include "mojo/public/c/system/wait.h" |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 namespace dart { | 27 namespace dart { |
28 | 28 |
29 #define CONTROL_HANDLE_INDEX 0 | 29 #define CONTROL_HANDLE_INDEX 0 |
30 | 30 |
31 static void PostNull(Dart_Port port) { | 31 static void PostNull(Dart_Port port) { |
32 if (port == ILLEGAL_PORT) { | 32 if (port == ILLEGAL_PORT) { |
33 return; | 33 return; |
34 } | 34 } |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 control_handles.push_back(it.first); | 582 control_handles.push_back(it.first); |
583 } | 583 } |
584 | 584 |
585 for (auto it : control_handles) { | 585 for (auto it : control_handles) { |
586 StopLocked(it); | 586 StopLocked(it); |
587 } | 587 } |
588 } | 588 } |
589 | 589 |
590 } // namespace dart | 590 } // namespace dart |
591 } // namespace mojo | 591 } // namespace mojo |
OLD | NEW |