Index: mojo/public/dart/src/buffer.dart |
diff --git a/mojo/public/dart/src/buffer.dart b/mojo/public/dart/src/buffer.dart |
index 44673157e5c5b34afa0c56ff42184add3ab9d821..a396dea8247c82ed7a24c75a83bc46cd192e2d65 100644 |
--- a/mojo/public/dart/src/buffer.dart |
+++ b/mojo/public/dart/src/buffer.dart |
@@ -5,21 +5,14 @@ |
part of core; |
class _MojoSharedBufferNatives { |
- static List Create(int numBytes, int flags) |
- native "MojoSharedBuffer_Create"; |
+ external static List Create(int numBytes, int flags); |
- static List Duplicate(int bufferHandle, int flags) |
- native "MojoSharedBuffer_Duplicate"; |
+ external static List Duplicate(int bufferHandle, int flags); |
- static List Map(MojoSharedBuffer buffer, |
- int bufferHandle, |
- int offset, |
- int numBytes, |
- int flags) |
- native "MojoSharedBuffer_Map"; |
+ external static List Map(MojoSharedBuffer buffer, int bufferHandle, |
+ int offset, int numBytes, int flags); |
- static int Unmap(ByteData buffer) |
- native "MojoSharedBuffer_Unmap"; |
+ external static int Unmap(ByteData buffer); |
} |
@@ -32,8 +25,8 @@ class MojoSharedBuffer { |
MojoResult status; |
ByteData mapping; |
- MojoSharedBuffer( |
- this.handle, [this.status = MojoResult.OK, this.mapping = null]); |
+ MojoSharedBuffer(this.handle, [this.status = MojoResult.OK, this.mapping = |
+ null]); |
factory MojoSharedBuffer.create(int numBytes, [int flags = 0]) { |
List result = _MojoSharedBufferNatives.Create(numBytes, flags); |
@@ -58,7 +51,7 @@ class MojoSharedBuffer { |
} |
assert((result is List) && (result.length == 2)); |
var r = new MojoResult(result[0]); |
- if(!r.isOk) { |
+ if (!r.isOk) { |
return null; |
} |
@@ -83,8 +76,8 @@ class MojoSharedBuffer { |
status = MojoResult.INVALID_ARGUMENT; |
return status; |
} |
- List result = _MojoSharedBufferNatives.Map( |
- this, handle.h, offset, numBytes, flags); |
+ List result = |
+ _MojoSharedBufferNatives.Map(this, handle.h, offset, numBytes, flags); |
if (result == null) { |
status = MojoResult.INVALID_ARGUMENT; |
return status; |