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

Side by Side Diff: content/browser/renderer_host/media/audio_input_sync_writer.h

Issue 525313002: SyncSocket Transit Descriptor - refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/sync_socket.h" 10 #include "base/sync_socket.h"
(...skipping 24 matching lines...) Expand all
35 virtual ~AudioInputSyncWriter(); 35 virtual ~AudioInputSyncWriter();
36 36
37 // media::AudioInputController::SyncWriter implementation. 37 // media::AudioInputController::SyncWriter implementation.
38 virtual void UpdateRecordedBytes(uint32 bytes) OVERRIDE; 38 virtual void UpdateRecordedBytes(uint32 bytes) OVERRIDE;
39 virtual void Write(const media::AudioBus* data, 39 virtual void Write(const media::AudioBus* data,
40 double volume, 40 double volume,
41 bool key_pressed) OVERRIDE; 41 bool key_pressed) OVERRIDE;
42 virtual void Close() OVERRIDE; 42 virtual void Close() OVERRIDE;
43 43
44 bool Init(); 44 bool Init();
45 bool PrepareForeignSocketHandle(base::ProcessHandle process_handle, 45 bool PrepareForeignSocket(base::ProcessHandle process_handle,
46 #if defined(OS_WIN) 46 base::SyncSocket::TransitDescriptor * descriptor);
burnik 2014/09/01 14:59:34 Nit done.
47 base::SyncSocket::Handle* foreign_handle);
48 #else
49 base::FileDescriptor* foreign_handle);
50 #endif
51 47
52 private: 48 private:
53 base::SharedMemory* shared_memory_; 49 base::SharedMemory* shared_memory_;
54 uint32 shared_memory_segment_size_; 50 uint32 shared_memory_segment_size_;
55 uint32 shared_memory_segment_count_; 51 uint32 shared_memory_segment_count_;
56 uint32 current_segment_id_; 52 uint32 current_segment_id_;
57 53
58 // Socket for transmitting audio data. 54 // Socket for transmitting audio data.
59 scoped_ptr<base::CancelableSyncSocket> socket_; 55 scoped_ptr<base::CancelableSyncSocket> socket_;
60 56
(...skipping 13 matching lines...) Expand all
74 // Vector of audio buses allocated during construction and deleted in the 70 // Vector of audio buses allocated during construction and deleted in the
75 // destructor. 71 // destructor.
76 ScopedVector<media::AudioBus> audio_buses_; 72 ScopedVector<media::AudioBus> audio_buses_;
77 73
78 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter); 74 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter);
79 }; 75 };
80 76
81 } // namespace content 77 } // namespace content
82 78
83 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_ 79 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698