| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVATE_
API_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/system_monitor/system_monitor.h" | 12 #include "base/system_monitor/system_monitor.h" |
| 13 #include "chrome/browser/extensions/chrome_extension_function.h" | 13 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 14 #include "chrome/common/extensions/api/webrtc_audio_private.h" | 14 #include "chrome/common/extensions/api/webrtc_audio_private.h" |
| 15 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
| 16 #include "content/public/browser/resource_context.h" | 16 #include "content/public/browser/resource_context.h" |
| 17 #include "extensions/browser/browser_context_keyed_api_factory.h" | 17 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 18 #include "media/audio/audio_device_name.h" | 18 #include "media/audio/audio_device_name.h" |
| 19 #include "url/gurl.h" | |
| 20 | 19 |
| 21 namespace extensions { | 20 namespace extensions { |
| 22 | 21 |
| 23 // Listens for device changes and forwards as an extension event. | 22 // Listens for device changes and forwards as an extension event. |
| 24 class WebrtcAudioPrivateEventService | 23 class WebrtcAudioPrivateEventService |
| 25 : public BrowserContextKeyedAPI, | 24 : public BrowserContextKeyedAPI, |
| 26 public base::SystemMonitor::DevicesChangedObserver { | 25 public base::SystemMonitor::DevicesChangedObserver { |
| 27 public: | 26 public: |
| 28 explicit WebrtcAudioPrivateEventService(content::BrowserContext* context); | 27 explicit WebrtcAudioPrivateEventService(content::BrowserContext* context); |
| 29 ~WebrtcAudioPrivateEventService() override; | 28 ~WebrtcAudioPrivateEventService() override; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 // time, no locking needed. | 219 // time, no locking needed. |
| 221 std::unique_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; | 220 std::unique_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; |
| 222 | 221 |
| 223 // Audio sources (input devices). Filled in by DoWorkOnDeviceThread. | 222 // Audio sources (input devices). Filled in by DoWorkOnDeviceThread. |
| 224 media::AudioDeviceNames source_devices_; | 223 media::AudioDeviceNames source_devices_; |
| 225 }; | 224 }; |
| 226 | 225 |
| 227 } // namespace extensions | 226 } // namespace extensions |
| 228 | 227 |
| 229 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ | 228 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ |
| OLD | NEW |