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

Side by Side Diff: mojo/public/java/src/org/chromium/mojo/system/SharedBufferHandle.java

Issue 325953006: Add pass operation on handles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix findbugs issue Created 6 years, 5 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 | Annotate | Revision Log
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 package org.chromium.mojo.system; 5 package org.chromium.mojo.system;
6 6
7 import java.nio.ByteBuffer; 7 import java.nio.ByteBuffer;
8 8
9 /** 9 /**
10 * A buffer that can be shared between applications. 10 * A buffer that can be shared between applications.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 /** 123 /**
124 * @return flags with no bit set. 124 * @return flags with no bit set.
125 */ 125 */
126 public static MapFlags none() { 126 public static MapFlags none() {
127 return new MapFlags(FLAG_NONE); 127 return new MapFlags(FLAG_NONE);
128 } 128 }
129 129
130 } 130 }
131 131
132 /** 132 /**
133 * @see org.chromium.mojo.system.Handle#pass()
134 */
135 @Override
136 public SharedBufferHandle pass();
137
138 /**
133 * Duplicates the handle. This creates another handle (returned on success), which can then be 139 * Duplicates the handle. This creates another handle (returned on success), which can then be
134 * sent to another application over a message pipe, while retaining access t o this handle (and 140 * sent to another application over a message pipe, while retaining access t o this handle (and
135 * any mappings that it may have). 141 * any mappings that it may have).
136 */ 142 */
137 public SharedBufferHandle duplicate(DuplicateOptions options); 143 public SharedBufferHandle duplicate(DuplicateOptions options);
138 144
139 /** 145 /**
140 * Map the part (at offset |offset| of length |numBytes|) of the buffer give n by this handle 146 * Map the part (at offset |offset| of length |numBytes|) of the buffer give n by this handle
141 * into memory. |offset + numBytes| must be less than or equal to the size o f the buffer. On 147 * into memory. |offset + numBytes| must be less than or equal to the size o f the buffer. On
142 * success, the returned buffer points to memory with the requested part of the buffer. A single 148 * success, the returned buffer points to memory with the requested part of the buffer. A single
143 * buffer handle may have multiple active mappings (possibly depending on th e buffer type). The 149 * buffer handle may have multiple active mappings (possibly depending on th e buffer type). The
144 * permissions (e.g., writable or executable) of the returned memory may dep end on the 150 * permissions (e.g., writable or executable) of the returned memory may dep end on the
145 * properties of the buffer and properties attached to the buffer handle as well as |flags|. 151 * properties of the buffer and properties attached to the buffer handle as well as |flags|.
146 */ 152 */
147 public ByteBuffer map(long offset, long numBytes, MapFlags flags); 153 public ByteBuffer map(long offset, long numBytes, MapFlags flags);
148 154
149 /** 155 /**
150 * Unmap a buffer pointer that was mapped by |map()|. 156 * Unmap a buffer pointer that was mapped by |map()|.
151 */ 157 */
152 public void unmap(ByteBuffer buffer); 158 public void unmap(ByteBuffer buffer);
153 159
154 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698