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

Side by Side Diff: media/audio/audio_input_device.h

Issue 1175003004: Change audio IPC enums from kConstantStyle to MACRO_STYLE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 6 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 // Low-latency audio capturing class utilizing audio input stream provided 5 // Low-latency audio capturing class utilizing audio input stream provided
6 // by a server (browser) process by use of an IPC interface. 6 // by a server (browser) process by use of an IPC interface.
7 // 7 //
8 // Relationship of classes: 8 // Relationship of classes:
9 // 9 //
10 // AudioInputController AudioInputDevice 10 // AudioInputController AudioInputDevice
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 friend class base::RefCountedThreadSafe<AudioInputDevice>; 97 friend class base::RefCountedThreadSafe<AudioInputDevice>;
98 ~AudioInputDevice() override; 98 ~AudioInputDevice() override;
99 99
100 // Methods called on IO thread ---------------------------------------------- 100 // Methods called on IO thread ----------------------------------------------
101 // AudioInputIPCDelegate implementation. 101 // AudioInputIPCDelegate implementation.
102 void OnStreamCreated(base::SharedMemoryHandle handle, 102 void OnStreamCreated(base::SharedMemoryHandle handle,
103 base::SyncSocket::Handle socket_handle, 103 base::SyncSocket::Handle socket_handle,
104 int length, 104 int length,
105 int total_segments) override; 105 int total_segments) override;
106 void OnVolume(double volume) override; 106 void OnVolume(double volume) override;
107 void OnStateChanged(AudioInputIPCDelegate::State state) override; 107 void OnStateChanged(AudioInputIPCDelegateState state) override;
108 void OnIPCClosed() override; 108 void OnIPCClosed() override;
109 109
110 private: 110 private:
111 // Note: The ordering of members in this enum is critical to correct behavior! 111 // Note: The ordering of members in this enum is critical to correct behavior!
112 enum State { 112 enum State {
113 IPC_CLOSED, // No more IPCs can take place. 113 IPC_CLOSED, // No more IPCs can take place.
114 IDLE, // Not started. 114 IDLE, // Not started.
115 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back. 115 CREATING_STREAM, // Waiting for OnStreamCreated() to be called back.
116 RECORDING, // Receiving audio data. 116 RECORDING, // Receiving audio data.
117 }; 117 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // TODO(miu): Replace this by changing AudioCapturerSource to accept the 166 // TODO(miu): Replace this by changing AudioCapturerSource to accept the
167 // callback via Start(). See http://crbug.com/151051 for details. 167 // callback via Start(). See http://crbug.com/151051 for details.
168 bool stopping_hack_; 168 bool stopping_hack_;
169 169
170 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice); 170 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputDevice);
171 }; 171 };
172 172
173 } // namespace media 173 } // namespace media
174 174
175 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_ 175 #endif // MEDIA_AUDIO_AUDIO_INPUT_DEVICE_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698