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

Side by Side Diff: content/renderer/pepper/pepper_platform_audio_input.h

Issue 2941773002: Added initial muted state to stream creation callback, to avoid races. (Closed)
Patch Set: Added mute information to DoCompleteCreation log message. Created 3 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Called on main thread. 51 // Called on main thread.
52 void StartCapture(); 52 void StartCapture();
53 void StopCapture(); 53 void StopCapture();
54 // Closes the stream. Make sure to call this before the object is destructed. 54 // Closes the stream. Make sure to call this before the object is destructed.
55 void ShutDown(); 55 void ShutDown();
56 56
57 // media::AudioInputIPCDelegate. 57 // media::AudioInputIPCDelegate.
58 void OnStreamCreated(base::SharedMemoryHandle handle, 58 void OnStreamCreated(base::SharedMemoryHandle handle,
59 base::SyncSocket::Handle socket_handle, 59 base::SyncSocket::Handle socket_handle,
60 int length, 60 int length,
61 int total_segments) override; 61 int total_segments,
62 bool initially_muted) override;
62 void OnError() override; 63 void OnError() override;
63 void OnMuted(bool is_muted) override; 64 void OnMuted(bool is_muted) override;
64 void OnIPCClosed() override; 65 void OnIPCClosed() override;
65 66
66 protected: 67 protected:
67 ~PepperPlatformAudioInput() override; 68 ~PepperPlatformAudioInput() override;
68 69
69 private: 70 private:
70 friend class base::RefCountedThreadSafe<PepperPlatformAudioInput>; 71 friend class base::RefCountedThreadSafe<PepperPlatformAudioInput>;
71 72
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool pending_open_device_; 123 bool pending_open_device_;
123 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD. 124 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD.
124 int pending_open_device_id_; 125 int pending_open_device_id_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput); 127 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput);
127 }; 128 };
128 129
129 } // namespace content 130 } // namespace content
130 131
131 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ 132 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_
OLDNEW
« no previous file with comments | « content/renderer/media/audio_input_message_filter.cc ('k') | content/renderer/pepper/pepper_platform_audio_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698