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 <string> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
12 #include "base/system_monitor/system_monitor.h" | 14 #include "base/system_monitor/system_monitor.h" |
13 #include "chrome/browser/extensions/chrome_extension_function.h" | 15 #include "chrome/browser/extensions/chrome_extension_function.h" |
14 #include "chrome/common/extensions/api/webrtc_audio_private.h" | 16 #include "chrome/common/extensions/api/webrtc_audio_private.h" |
15 #include "content/public/browser/render_process_host.h" | 17 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/browser/resource_context.h" | 18 #include "content/public/browser/resource_context.h" |
17 #include "extensions/browser/browser_context_keyed_api_factory.h" | 19 #include "extensions/browser/browser_context_keyed_api_factory.h" |
18 #include "media/audio/audio_device_name.h" | 20 #include "media/audio/audio_device_name.h" |
19 | 21 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // | 91 // |
90 // Call only on IO thread. | 92 // Call only on IO thread. |
91 std::string CalculateHMACImpl(const std::string& raw_id); | 93 std::string CalculateHMACImpl(const std::string& raw_id); |
92 | 94 |
93 // Initializes |device_id_salt_|. Must be called on the UI thread, | 95 // Initializes |device_id_salt_|. Must be called on the UI thread, |
94 // before any calls to |device_id_salt()|. | 96 // before any calls to |device_id_salt()|. |
95 void InitDeviceIDSalt(); | 97 void InitDeviceIDSalt(); |
96 | 98 |
97 // Callable from any thread. Must previously have called | 99 // Callable from any thread. Must previously have called |
98 // |InitDeviceIDSalt()|. | 100 // |InitDeviceIDSalt()|. |
99 const content::ResourceContext::SaltCallback& device_id_salt() const; | 101 std::string device_id_salt() const; |
100 | 102 |
101 private: | 103 private: |
102 content::ResourceContext::SaltCallback device_id_salt_; | 104 std::string device_id_salt_; |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(WebrtcAudioPrivateFunction); | 106 DISALLOW_COPY_AND_ASSIGN(WebrtcAudioPrivateFunction); |
105 }; | 107 }; |
106 | 108 |
107 class WebrtcAudioPrivateGetSinksFunction : public WebrtcAudioPrivateFunction { | 109 class WebrtcAudioPrivateGetSinksFunction : public WebrtcAudioPrivateFunction { |
108 protected: | 110 protected: |
109 ~WebrtcAudioPrivateGetSinksFunction() override {} | 111 ~WebrtcAudioPrivateGetSinksFunction() override {} |
110 | 112 |
111 private: | 113 private: |
112 DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.getSinks", | 114 DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.getSinks", |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // time, no locking needed. | 221 // time, no locking needed. |
220 std::unique_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; | 222 std::unique_ptr<api::webrtc_audio_private::GetAssociatedSink::Params> params_; |
221 | 223 |
222 // Audio sources (input devices). Filled in by DoWorkOnDeviceThread. | 224 // Audio sources (input devices). Filled in by DoWorkOnDeviceThread. |
223 media::AudioDeviceNames source_devices_; | 225 media::AudioDeviceNames source_devices_; |
224 }; | 226 }; |
225 | 227 |
226 } // namespace extensions | 228 } // namespace extensions |
227 | 229 |
228 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ | 230 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBRTC_AUDIO_PRIVATE_WEBRTC_AUDIO_PRIVA
TE_API_H_ |
OLD | NEW |