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

Unified Diff: mojo/public/dart/src/message_pipe.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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/dart/src/handle_watcher.dart ('k') | mojo/public/tools/dart_analyze.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/src/message_pipe.dart
diff --git a/mojo/public/dart/src/message_pipe.dart b/mojo/public/dart/src/message_pipe.dart
index f1d1a4b0aa6e91867a2d1ef435fabf7cb16d77ad..48363ee2ec8aba236be49bf3c9e71e540e9c0e21 100644
--- a/mojo/public/dart/src/message_pipe.dart
+++ b/mojo/public/dart/src/message_pipe.dart
@@ -6,16 +6,13 @@ part of core;
class _MojoMessagePipeNatives {
- static List MojoCreateMessagePipe(int flags)
- native "MojoMessagePipe_Create";
+ external static List MojoCreateMessagePipe(int flags);
- static int MojoWriteMessage(
- int handle, ByteData data, int numBytes, List<int> handles, int flags)
- native "MojoMessagePipe_Write";
+ external static int MojoWriteMessage(int handle, ByteData data, int numBytes,
+ List<int> handles, int flags);
- static List MojoReadMessage(
- int handle, ByteData data, int numBytes, List<int> handles, int flags)
- native "MojoMessagePipe_Read";
+ external static List MojoReadMessage(int handle, ByteData data, int numBytes,
+ List<int> handles, int flags);
}
@@ -40,10 +37,8 @@ class MojoMessagePipeEndpoint {
MojoMessagePipeEndpoint(this.handle);
- MojoResult write(ByteData data,
- [int numBytes = -1,
- List<MojoHandle> handles = null,
- int flags = 0]) {
+ MojoResult write(ByteData data, [int numBytes = -1, List<MojoHandle> handles =
+ null, int flags = 0]) {
if (handle == null) {
status = MojoResult.INVALID_ARGUMENT;
return status;
@@ -64,17 +59,19 @@ class MojoMessagePipeEndpoint {
// Do the call.
int result = _MojoMessagePipeNatives.MojoWriteMessage(
- handle.h, data, dataNumBytes, mojoHandles, flags);
+ handle.h,
+ data,
+ dataNumBytes,
+ mojoHandles,
+ flags);
status = new MojoResult(result);
return status;
}
- MojoMessagePipeReadResult read(ByteData data,
- [int numBytes = -1,
- List<MojoHandle> handles = null,
- int flags = 0]) {
+ MojoMessagePipeReadResult read(ByteData data, [int numBytes = -1,
+ List<MojoHandle> handles = null, int flags = 0]) {
if (handle == null) {
status = MojoResult.INVALID_ARGUMENT;
return null;
@@ -102,7 +99,11 @@ class MojoMessagePipeEndpoint {
// Do the call.
List result = _MojoMessagePipeNatives.MojoReadMessage(
- handle.h, data, dataNumBytes, mojoHandles, flags);
+ handle.h,
+ data,
+ dataNumBytes,
+ mojoHandles,
+ flags);
if (result == null) {
status = MojoResult.INVALID_ARGUMENT;
« no previous file with comments | « mojo/public/dart/src/handle_watcher.dart ('k') | mojo/public/tools/dart_analyze.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698