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

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

Issue 956653003: Dart: Moves |native| methods to patch files. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Adjust analyzer script Created 5 years, 9 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/data_pipe.dart ('k') | mojo/public/dart/src/handle_watcher.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(MojoEventStream eventStream) native "MojoHandle_Register"; 8 external static int register(MojoEventStream eventStream);
9 static int close(int handle) native "MojoHandle_Close"; 9 external static int close(int handle);
10 static List wait(int handle, int signals, int deadline) native 10 external static List wait(int handle, int signals, int deadline);
11 "MojoHandle_Wait"; 11 external static List waitMany(List<int> handles, List<int> signals,
12 static List waitMany(List<int> handles, List<int> signals, 12 int deadline);
13 int deadline) native "MojoHandle_WaitMany";
14 } 13 }
15 14
16 15
17 class MojoHandle { 16 class MojoHandle {
18 static const int INVALID = 0; 17 static const int INVALID = 0;
19 static const int DEADLINE_INDEFINITE = -1; 18 static const int DEADLINE_INDEFINITE = -1;
20 19
21 int h; 20 int h;
22 21
23 MojoHandle(this.h); 22 MojoHandle(this.h);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 65 }
67 66
68 bool get isValid => (h != INVALID); 67 bool get isValid => (h != INVALID);
69 68
70 String toString() => "$h"; 69 String toString() => "$h";
71 70
72 bool operator ==(MojoHandle other) { 71 bool operator ==(MojoHandle other) {
73 return h == other.h; 72 return h == other.h;
74 } 73 }
75 } 74 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/data_pipe.dart ('k') | mojo/public/dart/src/handle_watcher.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698