Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ | 6 #define CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ |
| 7 | 7 |
| 8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 ~BrowserIOSurfaceManager() override; | 72 ~BrowserIOSurfaceManager() override; |
| 73 | 73 |
| 74 // Performs any initialization work. | 74 // Performs any initialization work. |
| 75 bool Initialize(); | 75 bool Initialize(); |
| 76 | 76 |
| 77 // Message handler that is invoked on |dispatch_source_| when an | 77 // Message handler that is invoked on |dispatch_source_| when an |
| 78 // incoming message needs to be received. | 78 // incoming message needs to be received. |
| 79 void HandleRequest(); | 79 void HandleRequest(); |
| 80 | 80 |
| 81 // Message handlers that are invoked from HandleRequest. | 81 // Message handlers that are invoked from HandleRequest. |
| 82 bool HandleRegisterIOSurfaceRequest( | 82 void HandleRegisterIOSurfaceRequest( |
| 83 const IOSurfaceManagerHostMsg_RegisterIOSurface& request, | 83 const IOSurfaceManagerHostMsg_RegisterIOSurface& request, |
| 84 IOSurfaceManagerMsg_RegisterIOSurfaceReply* reply); | 84 IOSurfaceManagerMsg_RegisterIOSurfaceReply* reply); |
| 85 bool HandleUnregisterIOSurfaceRequest( | 85 void HandleUnregisterIOSurfaceRequest( |
| 86 const IOSurfaceManagerHostMsg_UnregisterIOSurface& request); | 86 const IOSurfaceManagerHostMsg_UnregisterIOSurface& request, |
| 87 bool HandleAcquireIOSurfaceRequest( | 87 bool* result); |
|
reveman
2015/09/17 03:58:22
can we keep this as a return value instead?
ccameron
2015/09/17 18:35:05
Done.
| |
| 88 void HandleAcquireIOSurfaceRequest( | |
| 88 const IOSurfaceManagerHostMsg_AcquireIOSurface& request, | 89 const IOSurfaceManagerHostMsg_AcquireIOSurface& request, |
| 89 IOSurfaceManagerMsg_AcquireIOSurfaceReply* reply); | 90 IOSurfaceManagerMsg_AcquireIOSurfaceReply* reply); |
| 90 | 91 |
| 91 // Whether or not the class has been initialized. | 92 // Whether or not the class has been initialized. |
| 92 bool initialized_; | 93 bool initialized_; |
| 93 | 94 |
| 94 // The Mach port on which the server listens. | 95 // The Mach port on which the server listens. |
| 95 base::mac::ScopedMachReceiveRight server_port_; | 96 base::mac::ScopedMachReceiveRight server_port_; |
| 96 | 97 |
| 97 // The dispatch source and queue on which Mach messages will be received. | 98 // The dispatch source and queue on which Mach messages will be received. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 116 // Mutex that guards |initialized_|, |io_surfaces_|, |child_process_ids_| | 117 // Mutex that guards |initialized_|, |io_surfaces_|, |child_process_ids_| |
| 117 // and |gpu_process_token_|. | 118 // and |gpu_process_token_|. |
| 118 base::Lock lock_; | 119 base::Lock lock_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(BrowserIOSurfaceManager); | 121 DISALLOW_COPY_AND_ASSIGN(BrowserIOSurfaceManager); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace content | 124 } // namespace content |
| 124 | 125 |
| 125 #endif // CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ | 126 #endif // CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ |
| OLD | NEW |