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

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

Issue 2809673002: Fix double close in MojoAudioOutputStream. (Closed)
Patch Set: Fix Win complie. Created 3 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
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 // AudioRendererHost serves audio related requests from AudioRenderer which 5 // AudioRendererHost serves audio related requests from AudioRenderer which
6 // lives inside the render process and provide access to audio hardware. 6 // lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // This class is owned by RenderProcessHostImpl, and instantiated on UI 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI
9 // thread, but all other operations and method calls happen on IO thread, so we 9 // thread, but all other operations and method calls happen on IO thread, so we
10 // need to be extra careful about the lifetime of this object. AudioManager is a 10 // need to be extra careful about the lifetime of this object. AudioManager is a
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void GetOutputControllers( 84 void GetOutputControllers(
85 const RenderProcessHost::GetAudioOutputControllersCallback& 85 const RenderProcessHost::GetAudioOutputControllersCallback&
86 callback) const; 86 callback) const;
87 87
88 // BrowserMessageFilter implementation. 88 // BrowserMessageFilter implementation.
89 void OnChannelClosing() override; 89 void OnChannelClosing() override;
90 void OnDestruct() const override; 90 void OnDestruct() const override;
91 bool OnMessageReceived(const IPC::Message& message) override; 91 bool OnMessageReceived(const IPC::Message& message) override;
92 92
93 // AudioOutputDelegate::EventHandler implementation 93 // AudioOutputDelegate::EventHandler implementation
94 void OnStreamCreated(int stream_id, 94 void OnStreamCreated(
95 base::SharedMemory* shared_memory, 95 int stream_id,
96 base::CancelableSyncSocket* foreign_socket) override; 96 base::SharedMemory* shared_memory,
97 std::unique_ptr<base::CancelableSyncSocket> foreign_socket) override;
97 void OnStreamError(int stream_id) override; 98 void OnStreamError(int stream_id) override;
98 99
99 void OverrideDevicePermissionsForTesting(bool has_access); 100 void OverrideDevicePermissionsForTesting(bool has_access);
100 101
101 private: 102 private:
102 friend class AudioRendererHostTest; 103 friend class AudioRendererHostTest;
103 friend class BrowserThread; 104 friend class BrowserThread;
104 friend class base::DeleteHelper<AudioRendererHost>; 105 friend class base::DeleteHelper<AudioRendererHost>;
105 friend class MockAudioRendererHost; 106 friend class MockAudioRendererHost;
106 friend class TestAudioRendererHost; 107 friend class TestAudioRendererHost;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 ValidateRenderFrameIdFunction validate_render_frame_id_function_; 229 ValidateRenderFrameIdFunction validate_render_frame_id_function_;
229 230
230 AudioOutputAuthorizationHandler authorization_handler_; 231 AudioOutputAuthorizationHandler authorization_handler_;
231 232
232 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); 233 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
233 }; 234 };
234 235
235 } // namespace content 236 } // namespace content
236 237
237 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 238 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698