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

Side by Side Diff: mojo/dart/packages/mojo/lib/src/buffer.dart

Issue 1694413003: Cleanups in the Mojo package. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 unified diff | Download patch
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 MojoSharedBuffer { 7 class MojoSharedBuffer {
8 static const int createFlagNone = 0; 8 static const int createFlagNone = MojoConstants.kNone;
zra 2016/02/16 16:58:26 This indirection increases the amount of compilati
floitsch 2016/02/16 17:03:54 The constants are defined by the internal library
9 static const int duplicateFlagNone = 0; 9 static const int duplicateFlagNone = MojoConstants.kNone;
10 static const int mapFlagNone = 0; 10 static const int mapFlagNone = MojoConstants.kNone;
11 11
12 MojoHandle _handle; 12 MojoHandle _handle;
13 int _status = MojoResult.kOk; 13 int _status = MojoResult.kOk;
14 14
15 MojoHandle get handle => _handle; 15 MojoHandle get handle => _handle;
16 int get status => _status; 16 int get status => _status;
17 17
18 MojoSharedBuffer(this._handle, [this._status = MojoResult.kOk]); 18 MojoSharedBuffer(this._handle, [this._status = MojoResult.kOk]);
19 19
20 factory MojoSharedBuffer.create(int numBytes, [int flags = createFlagNone]) { 20 factory MojoSharedBuffer.create(int numBytes, [int flags = createFlagNone]) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 List result = 64 List result =
65 MojoSharedBufferNatives.Map(handle.h, offset, numBytes, flags); 65 MojoSharedBufferNatives.Map(handle.h, offset, numBytes, flags);
66 if (result == null) { 66 if (result == null) {
67 _status = MojoResult.kInvalidArgument; 67 _status = MojoResult.kInvalidArgument;
68 return null; 68 return null;
69 } 69 }
70 _status = result[0]; 70 _status = result[0];
71 return result[1]; 71 return result[1];
72 } 72 }
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698