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

Unified Diff: third_party/mojo/src/mojo/public/dart/src/buffer.dart

Issue 1142043005: Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix type conversion errors on win64 for some msvs Created 5 years, 7 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
Index: third_party/mojo/src/mojo/public/dart/src/buffer.dart
diff --git a/third_party/mojo/src/mojo/public/dart/src/buffer.dart b/third_party/mojo/src/mojo/public/dart/src/buffer.dart
deleted file mode 100644
index 5e153be576f9ccc9647519e7797492f6ff872878..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/dart/src/buffer.dart
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-part of core;
-
-class MojoSharedBuffer {
- static const int CREATE_FLAG_NONE = 0;
- static const int DUPLICATE_FLAG_NONE = 0;
- static const int MAP_FLAG_NONE = 0;
-
- MojoHandle handle;
- MojoResult status;
- ByteData mapping;
-
- MojoSharedBuffer(this.handle,
- [this.status = MojoResult.OK, this.mapping = null]);
-
- factory MojoSharedBuffer.create(int numBytes, [int flags = 0]) {
- List result = MojoSharedBufferNatives.Create(numBytes, flags);
- if (result == null) {
- return null;
- }
- assert((result is List) && (result.length == 2));
- var r = new MojoResult(result[0]);
- if (!r.isOk) {
- return null;
- }
-
- MojoSharedBuffer buf =
- new MojoSharedBuffer(new MojoHandle(result[1]), r, null);
- return buf;
- }
-
- factory MojoSharedBuffer.duplicate(MojoSharedBuffer msb, [int flags = 0]) {
- List result = MojoSharedBufferNatives.Duplicate(msb.handle.h, flags);
- if (result == null) {
- return null;
- }
- assert((result is List) && (result.length == 2));
- var r = new MojoResult(result[0]);
- if (!r.isOk) {
- return null;
- }
-
- MojoSharedBuffer dupe =
- new MojoSharedBuffer(new MojoHandle(result[1]), r, null);
- return dupe;
- }
-
- MojoResult close() {
- if (handle == null) {
- status = MojoResult.INVALID_ARGUMENT;
- return status;
- }
- MojoResult r = handle.close();
- status = r;
- mapping = null;
- return status;
- }
-
- MojoResult map(int offset, int numBytes, [int flags = 0]) {
- if (handle == null) {
- status = MojoResult.INVALID_ARGUMENT;
- return status;
- }
- List result =
- MojoSharedBufferNatives.Map(this, handle.h, offset, numBytes, flags);
- if (result == null) {
- status = MojoResult.INVALID_ARGUMENT;
- return status;
- }
- assert((result is List) && (result.length == 2));
- status = new MojoResult(result[0]);
- mapping = result[1];
- return status;
- }
-
- MojoResult unmap() {
- int r = MojoSharedBufferNatives.Unmap(mapping);
- status = new MojoResult(r);
- mapping = null;
- return status;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698