OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/file_descriptor_posix.h" | 9 #include "base/file_descriptor_posix.h" |
10 #include "base/process.h" | 10 #include "base/process.h" |
11 #include "base/sync_socket.h" | 11 #include "base/sync_socket.h" |
(...skipping 22 matching lines...) Expand all Loading... |
34 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, | 34 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, |
35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
36 base::SyncSocket::Handle* foreign_handle); | 36 base::SyncSocket::Handle* foreign_handle); |
37 #else | 37 #else |
38 base::FileDescriptor* foreign_handle); | 38 base::FileDescriptor* foreign_handle); |
39 #endif | 39 #endif |
40 | 40 |
41 private: | 41 private: |
42 base::SharedMemory* shared_memory_; | 42 base::SharedMemory* shared_memory_; |
43 | 43 |
44 // Socket for transmitting audio data. | 44 // A pair of SyncSocket for transmitting audio data. |
45 scoped_ptr<base::CancelableSyncSocket> socket_; | 45 scoped_ptr<base::SyncSocket> socket_; |
46 | 46 |
47 // Socket to be used by the renderer. The reference is released after | 47 // SyncSocket to be used by the renderer. The reference is released after |
48 // PrepareForeignSocketHandle() is called and ran successfully. | 48 // PrepareForeignSocketHandle() is called and ran successfully. |
49 scoped_ptr<base::CancelableSyncSocket> foreign_socket_; | 49 scoped_ptr<base::SyncSocket> foreign_socket_; |
50 | 50 |
51 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); | 51 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); |
52 }; | 52 }; |
53 | 53 |
54 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ | 54 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ |
OLD | NEW |