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

Unified Diff: content/child/child_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | ipc/attachment_broker_mac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_io_surface_manager_mac.cc
diff --git a/content/child/child_io_surface_manager_mac.cc b/content/child/child_io_surface_manager_mac.cc
index 883defe99b56fde5ff351de244b022e0145d00bb..063fe4cb78869e68986505b7fde379d288916e5c 100644
--- a/content/child/child_io_surface_manager_mac.cc
+++ b/content/child/child_io_surface_manager_mac.cc
@@ -45,12 +45,12 @@ bool ChildIOSurfaceManager::RegisterIOSurface(IOSurfaceId io_surface_id,
data.request.header.msgh_bits =
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE) |
MACH_MSGH_BITS_COMPLEX;
- data.request.header.msgh_remote_port = service_port_;
+ data.request.header.msgh_remote_port = service_port_.get();
data.request.header.msgh_local_port = reply_port;
data.request.header.msgh_size = sizeof(data.request);
data.request.header.msgh_id = IOSurfaceManagerHostMsg_RegisterIOSurface::ID;
data.request.body.msgh_descriptor_count = 1;
- data.request.io_surface_port.name = scoped_io_surface_right;
+ data.request.io_surface_port.name = scoped_io_surface_right.get();
data.request.io_surface_port.disposition = MACH_MSG_TYPE_COPY_SEND;
data.request.io_surface_port.type = MACH_MSG_PORT_DESCRIPTOR;
data.request.io_surface_id = io_surface_id.id;
@@ -75,7 +75,7 @@ void ChildIOSurfaceManager::UnregisterIOSurface(IOSurfaceId io_surface_id,
IOSurfaceManagerHostMsg_UnregisterIOSurface request = {{0}};
request.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0);
- request.header.msgh_remote_port = service_port_;
+ request.header.msgh_remote_port = service_port_.get();
request.header.msgh_local_port = MACH_PORT_NULL;
request.header.msgh_size = sizeof(request);
request.header.msgh_id = IOSurfaceManagerHostMsg_UnregisterIOSurface::ID;
@@ -114,7 +114,7 @@ IOSurfaceRef ChildIOSurfaceManager::AcquireIOSurface(
} data = {{{0}}};
data.request.header.msgh_bits =
MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND_ONCE);
- data.request.header.msgh_remote_port = service_port_;
+ data.request.header.msgh_remote_port = service_port_.get();
data.request.header.msgh_local_port = reply_port;
data.request.header.msgh_size = sizeof(data.request);
data.request.header.msgh_id = IOSurfaceManagerHostMsg_AcquireIOSurface::ID;
@@ -137,7 +137,7 @@ IOSurfaceRef ChildIOSurfaceManager::AcquireIOSurface(
base::mac::ScopedMachSendRight scoped_io_surface_right(
data.reply.msg.io_surface_port.name);
- return IOSurfaceLookupFromMachPort(scoped_io_surface_right);
+ return IOSurfaceLookupFromMachPort(scoped_io_surface_right.get());
}
ChildIOSurfaceManager::ChildIOSurfaceManager() {}
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | ipc/attachment_broker_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698