| 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 } | 113 } |
| 114 | 114 |
| 115 scoped_ptr<base::Value> InvokeGetSinks(base::ListValue** sink_list) { | 115 scoped_ptr<base::Value> InvokeGetSinks(base::ListValue** sink_list) { |
| 116 scoped_refptr<WebrtcAudioPrivateGetSinksFunction> function = | 116 scoped_refptr<WebrtcAudioPrivateGetSinksFunction> function = |
| 117 new WebrtcAudioPrivateGetSinksFunction(); | 117 new WebrtcAudioPrivateGetSinksFunction(); |
| 118 function->set_source_url(source_url_); | 118 function->set_source_url(source_url_); |
| 119 | 119 |
| 120 scoped_ptr<base::Value> result( | 120 scoped_ptr<base::Value> result( |
| 121 RunFunctionAndReturnSingleResult(function.get(), "[]", browser())); | 121 RunFunctionAndReturnSingleResult(function.get(), "[]", browser())); |
| 122 result->GetAsList(sink_list); | 122 result->GetAsList(sink_list); |
| 123 return result.Pass(); | 123 return result; |
| 124 } | 124 } |
| 125 | 125 |
| 126 // Synchronously (from the calling thread's point of view) runs the | 126 // Synchronously (from the calling thread's point of view) runs the |
| 127 // given enumeration function on the device thread. On return, | 127 // given enumeration function on the device thread. On return, |
| 128 // |device_names| has been filled with the device names resulting | 128 // |device_names| has been filled with the device names resulting |
| 129 // from that call. | 129 // from that call. |
| 130 void GetAudioDeviceNames( | 130 void GetAudioDeviceNames( |
| 131 void (AudioManager::*EnumerationFunc)(AudioDeviceNames*), | 131 void (AudioManager::*EnumerationFunc)(AudioDeviceNames*), |
| 132 AudioDeviceNames* device_names) { | 132 AudioDeviceNames* device_names) { |
| 133 AudioManager* audio_manager = AudioManager::Get(); | 133 AudioManager* audio_manager = AudioManager::Get(); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); | 434 title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16("failure")); |
| 435 base::string16 result = title_watcher.WaitAndGetTitle(); | 435 base::string16 result = title_watcher.WaitAndGetTitle(); |
| 436 EXPECT_EQ(base::ASCIIToUTF16("success"), result); | 436 EXPECT_EQ(base::ASCIIToUTF16("success"), result); |
| 437 | 437 |
| 438 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( | 438 g_browser_process->webrtc_log_uploader()->OverrideUploadWithBufferForTesting( |
| 439 NULL); | 439 NULL); |
| 440 } | 440 } |
| 441 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN
SION) | 441 #endif // defined(GOOGLE_CHROME_BUILD) || defined(ENABLE_HANGOUT_SERVICES_EXTEN
SION) |
| 442 | 442 |
| 443 } // namespace extensions | 443 } // namespace extensions |
| OLD | NEW |