| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 5 |
| 6 part of core; | 6 part of core; |
| 7 | 7 |
| 8 | 8 |
| 9 class MojoResult { | 9 class MojoResult { |
| 10 static const int kOk = 0; | 10 static const int kOk = 0; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 default: return "<invalid result>"; | 115 default: return "<invalid result>"; |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 | 120 |
| 121 class MojoHandleSignals { | 121 class MojoHandleSignals { |
| 122 static const int NONE = 0; | 122 static const int NONE = 0; |
| 123 static const int READABLE = 1 << 0; | 123 static const int READABLE = 1 << 0; |
| 124 static const int WRITABLE = 1 << 1; | 124 static const int WRITABLE = 1 << 1; |
| 125 static const int PEER_CLOSED = 1 << 2; |
| 125 static const int READWRITE = READABLE | WRITABLE; | 126 static const int READWRITE = READABLE | WRITABLE; |
| 126 | 127 |
| 127 static bool isNone(int mask) => mask == NONE; | 128 static bool isNone(int mask) => mask == NONE; |
| 128 static bool isReadable(int mask) => (mask & READABLE) == READABLE; | 129 static bool isReadable(int mask) => (mask & READABLE) == READABLE; |
| 129 static bool isWritable(int mask) => (mask & WRITABLE) == WRITABLE; | 130 static bool isWritable(int mask) => (mask & WRITABLE) == WRITABLE; |
| 130 static bool isReadWrite(int mask) => (mask & READWRITE) == READWRITE; | 131 static bool isReadWrite(int mask) => (mask & READWRITE) == READWRITE; |
| 131 static int toggleWrite(int mask) => | 132 static int toggleWrite(int mask) => |
| 132 isWritable(mask) ? (mask & ~WRITABLE) : (mask | WRITABLE); | 133 isWritable(mask) ? (mask & ~WRITABLE) : (mask | WRITABLE); |
| 133 } | 134 } |
| 134 | 135 |
| 135 | 136 |
| 136 class MojoHandleSignalsState { | 137 class MojoHandleSignalsState { |
| 137 const MojoHandleSignalsState(this.satisfied_signals, | 138 const MojoHandleSignalsState(this.satisfied_signals, |
| 138 this.satisfiable_signals); | 139 this.satisfiable_signals); |
| 139 final int satisfied_signals; | 140 final int satisfied_signals; |
| 140 final int satisfiable_signals; | 141 final int satisfiable_signals; |
| 141 } | 142 } |
| OLD | NEW |