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

Side by Side Diff: mojo/public/dart/src/handle_watcher.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/handle.dart ('k') | mojo/public/dart/src/message_pipe.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 _MojoHandleWatcherNatives { 7 class _MojoHandleWatcherNatives {
8 static int sendControlData(int controlHandle, int mojoHandle, SendPort port, 8 external static int sendControlData(int controlHandle, int mojoHandle,
9 int data) native "MojoHandleWatcher_SendControlData"; 9 SendPort port, int data);
10 static List recvControlData(int controlHandle) native 10 external static List recvControlData(int controlHandle);
11 "MojoHandleWatcher_RecvControlData"; 11 external static int setControlHandle(int controlHandle);
12 static int setControlHandle(int controlHandle) native 12 external static int getControlHandle();
13 "MojoHandleWatcher_SetControlHandle";
14 static int getControlHandle() native "MojoHandleWatcher_GetControlHandle";
15 } 13 }
16 14
17 // The MojoHandleWatcher sends a stream of events to application isolates that 15 // The MojoHandleWatcher sends a stream of events to application isolates that
18 // register Mojo handles with it. Application isolates make the following calls: 16 // register Mojo handles with it. Application isolates make the following calls:
19 // 17 //
20 // add(handle, port, signals) - Instructs the MojoHandleWatcher isolate to add 18 // add(handle, port, signals) - Instructs the MojoHandleWatcher isolate to add
21 // 'handle' to the set of handles it watches, and to notify the calling 19 // 'handle' to the set of handles it watches, and to notify the calling
22 // isolate only for the events specified by 'signals' using the send port 20 // isolate only for the events specified by 'signals' using the send port
23 // 'port' 21 // 'port'
24 // 22 //
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 334 }
337 335
338 static MojoResult timer(Object ignored, SendPort port, int deadline) { 336 static MojoResult timer(Object ignored, SendPort port, int deadline) {
339 // The deadline will be unwrapped before sending to the handle watcher. 337 // The deadline will be unwrapped before sending to the handle watcher.
340 return _sendControlData( 338 return _sendControlData(
341 new MojoHandle(deadline), 339 new MojoHandle(deadline),
342 port, 340 port,
343 _encodeCommand(TIMER)); 341 _encodeCommand(TIMER));
344 } 342 }
345 } 343 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/handle.dart ('k') | mojo/public/dart/src/message_pipe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698