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

Side by Side Diff: content/browser/browser_io_surface_manager_mac.cc

Issue 1411523006: mac: Make Mach port scopers better ScopedGenerics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years, 2 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
« no previous file with comments | « base/time/time_mac.cc ('k') | content/browser/mach_broker_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "content/browser/browser_io_surface_manager_mac.h" 5 #include "content/browser/browser_io_surface_manager_mac.h"
6 6
7 #include <servers/bootstrap.h> 7 #include <servers/bootstrap.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 IOSurfaceManagerHostMsg_UnregisterIOSurface unregister_io_surface; 185 IOSurfaceManagerHostMsg_UnregisterIOSurface unregister_io_surface;
186 IOSurfaceManagerHostMsg_AcquireIOSurface acquire_io_surface; 186 IOSurfaceManagerHostMsg_AcquireIOSurface acquire_io_surface;
187 } msg; 187 } msg;
188 mach_msg_trailer_t trailer; 188 mach_msg_trailer_t trailer;
189 } request = {{{0}}}; 189 } request = {{{0}}};
190 request.msg.header.msgh_size = sizeof(request); 190 request.msg.header.msgh_size = sizeof(request);
191 request.msg.header.msgh_local_port = server_port_.get(); 191 request.msg.header.msgh_local_port = server_port_.get();
192 192
193 kern_return_t kr = 193 kern_return_t kr =
194 mach_msg(&request.msg.header, MACH_RCV_MSG, 0, sizeof(request), 194 mach_msg(&request.msg.header, MACH_RCV_MSG, 0, sizeof(request),
195 server_port_, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); 195 server_port_.get(), MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
196 if (kr != KERN_SUCCESS) { 196 if (kr != KERN_SUCCESS) {
197 MACH_LOG(ERROR, kr) << "mach_msg"; 197 MACH_LOG(ERROR, kr) << "mach_msg";
198 return; 198 return;
199 } 199 }
200 200
201 union { 201 union {
202 mach_msg_header_t header; 202 mach_msg_header_t header;
203 IOSurfaceManagerMsg_RegisterIOSurfaceReply register_io_surface; 203 IOSurfaceManagerMsg_RegisterIOSurfaceReply register_io_surface;
204 IOSurfaceManagerMsg_AcquireIOSurfaceReply acquire_io_surface; 204 IOSurfaceManagerMsg_AcquireIOSurfaceReply acquire_io_surface;
205 } reply = {{0}}; 205 } reply = {{0}};
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 return; 311 return;
312 } 312 }
313 313
314 reply->body.msgh_descriptor_count = 1; 314 reply->body.msgh_descriptor_count = 1;
315 reply->io_surface_port.name = it->second->get(); 315 reply->io_surface_port.name = it->second->get();
316 reply->io_surface_port.disposition = MACH_MSG_TYPE_COPY_SEND; 316 reply->io_surface_port.disposition = MACH_MSG_TYPE_COPY_SEND;
317 reply->io_surface_port.type = MACH_MSG_PORT_DESCRIPTOR; 317 reply->io_surface_port.type = MACH_MSG_PORT_DESCRIPTOR;
318 } 318 }
319 319
320 } // namespace content 320 } // namespace content
OLDNEW
« no previous file with comments | « base/time/time_mac.cc ('k') | content/browser/mach_broker_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698