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

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

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 years, 11 months 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/dart/src/codec.dart ('k') | mojo/public/dart/src/interface.dart » ('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 part of core; 5 part of core;
6 6
7 class _MojoHandleNatives { 7 class _MojoHandleNatives {
8 static int register(MojoHandle handle) native "MojoHandle_Register"; 8 static int register(MojoHandle handle) native "MojoHandle_Register";
9 static int close(int handle) native "MojoHandle_Close"; 9 static int close(int handle) native "MojoHandle_Close";
10 static int wait(int handle, int signals, int deadline) 10 static int wait(int handle, int signals, int deadline)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // The receive port on which we listen and receive events from the handle 92 // The receive port on which we listen and receive events from the handle
93 // watcher. 93 // watcher.
94 ReceivePort _receivePort; 94 ReceivePort _receivePort;
95 95
96 // The signals on this handle that we're interested in. 96 // The signals on this handle that we're interested in.
97 int _signals; 97 int _signals;
98 98
99 // Whether the handle has been added to the handle watcher. 99 // Whether the handle has been added to the handle watcher.
100 bool _eventHandlerAdded; 100 bool _eventHandlerAdded;
101 101
102 MojoHandle(this._handle) : 102 MojoHandle(this._handle) :
103 _signals = MojoHandleSignals.READABLE, 103 _signals = MojoHandleSignals.READABLE,
104 _eventHandlerAdded = false { 104 _eventHandlerAdded = false {
105 MojoResult result = RawMojoHandle.register(this); 105 MojoResult result = RawMojoHandle.register(this);
106 if (!result.isOk) { 106 if (!result.isOk) {
107 throw new Exception("Failed to register the MojoHandle"); 107 throw new Exception("Failed to register the MojoHandle");
108 } 108 }
109 } 109 }
110 110
111 void close() { 111 void close() {
112 if (_eventHandlerAdded) { 112 if (_eventHandlerAdded) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (!res.isOk) { 213 if (!res.isOk) {
214 throw new Exception("MojoHandleWatcher add failed: $res"); 214 throw new Exception("MojoHandleWatcher add failed: $res");
215 } 215 }
216 _eventHandlerAdded = true; 216 _eventHandlerAdded = true;
217 } 217 }
218 } 218 }
219 } 219 }
220 220
221 String toString() => "$_handle"; 221 String toString() => "$_handle";
222 } 222 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/codec.dart ('k') | mojo/public/dart/src/interface.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698