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

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

Issue 9968054: Move media/audio files into media namespace (relanding) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
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 #include "content/browser/renderer_host/media/audio_input_sync_writer.h" 5 #include "content/browser/renderer_host/media/audio_input_sync_writer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
11 11
12 namespace media {
13
12 AudioInputSyncWriter::AudioInputSyncWriter(base::SharedMemory* shared_memory) 14 AudioInputSyncWriter::AudioInputSyncWriter(base::SharedMemory* shared_memory)
13 : shared_memory_(shared_memory) { 15 : shared_memory_(shared_memory) {
14 } 16 }
15 17
16 AudioInputSyncWriter::~AudioInputSyncWriter() {} 18 AudioInputSyncWriter::~AudioInputSyncWriter() {}
17 19
18 // TODO(henrika): Combine into one method (including Write). 20 // TODO(henrika): Combine into one method (including Write).
19 void AudioInputSyncWriter::UpdateRecordedBytes(uint32 bytes) { 21 void AudioInputSyncWriter::UpdateRecordedBytes(uint32 bytes) {
20 socket_->Send(&bytes, sizeof(bytes)); 22 socket_->Send(&bytes, sizeof(bytes));
21 } 23 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 59
58 bool AudioInputSyncWriter::PrepareForeignSocketHandle( 60 bool AudioInputSyncWriter::PrepareForeignSocketHandle(
59 base::ProcessHandle process_handle, 61 base::ProcessHandle process_handle,
60 base::FileDescriptor* foreign_handle) { 62 base::FileDescriptor* foreign_handle) {
61 foreign_handle->fd = foreign_socket_->handle(); 63 foreign_handle->fd = foreign_socket_->handle();
62 foreign_handle->auto_close = false; 64 foreign_handle->auto_close = false;
63 return (foreign_handle->fd != -1); 65 return (foreign_handle->fd != -1);
64 } 66 }
65 67
66 #endif 68 #endif
69
70 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698