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 bool HandleUnregisterIOSurfaceRequest( |
86 const IOSurfaceManagerHostMsg_UnregisterIOSurface& request); | 86 const IOSurfaceManagerHostMsg_UnregisterIOSurface& request); |
87 bool HandleAcquireIOSurfaceRequest( | 87 void HandleAcquireIOSurfaceRequest( |
88 const IOSurfaceManagerHostMsg_AcquireIOSurface& request, | 88 const IOSurfaceManagerHostMsg_AcquireIOSurface& request, |
89 IOSurfaceManagerMsg_AcquireIOSurfaceReply* reply); | 89 IOSurfaceManagerMsg_AcquireIOSurfaceReply* reply); |
90 | 90 |
91 // Whether or not the class has been initialized. | 91 // Whether or not the class has been initialized. |
92 bool initialized_; | 92 bool initialized_; |
93 | 93 |
94 // The Mach port on which the server listens. | 94 // The Mach port on which the server listens. |
95 base::mac::ScopedMachReceiveRight server_port_; | 95 base::mac::ScopedMachReceiveRight server_port_; |
96 | 96 |
97 // The dispatch source and queue on which Mach messages will be received. | 97 // 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_| | 116 // Mutex that guards |initialized_|, |io_surfaces_|, |child_process_ids_| |
117 // and |gpu_process_token_|. | 117 // and |gpu_process_token_|. |
118 base::Lock lock_; | 118 base::Lock lock_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(BrowserIOSurfaceManager); | 120 DISALLOW_COPY_AND_ASSIGN(BrowserIOSurfaceManager); |
121 }; | 121 }; |
122 | 122 |
123 } // namespace content | 123 } // namespace content |
124 | 124 |
125 #endif // CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ | 125 #endif // CONTENT_BROWSER_BROWSER_IO_SURFACE_MANAGER_MAC_H_ |
OLD | NEW |