Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: mojo/public/dart/src/types.dart

Issue 741503003: Adding MOJO_HANDLE_SIGNAL_PEER_CLOSED to be notified when a peer is closed. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix go formatting Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/public/c/system/types.h ('k') | mojo/public/go/system/impl/mojo_types.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « mojo/public/c/system/types.h ('k') | mojo/public/go/system/impl/mojo_types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698