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 "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_privat
e_api.h" | 5 #include "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_privat
e_api.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 // static | 68 // static |
69 const char* WebrtcAudioPrivateEventService::service_name() { | 69 const char* WebrtcAudioPrivateEventService::service_name() { |
70 return "WebrtcAudioPrivateEventService"; | 70 return "WebrtcAudioPrivateEventService"; |
71 } | 71 } |
72 | 72 |
73 void WebrtcAudioPrivateEventService::OnDevicesChanged( | 73 void WebrtcAudioPrivateEventService::OnDevicesChanged( |
74 base::SystemMonitor::DeviceType device_type) { | 74 base::SystemMonitor::DeviceType device_type) { |
75 switch (device_type) { | 75 switch (device_type) { |
76 case base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE: | 76 case base::SystemMonitor::DEVTYPE_AUDIO: |
77 case base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE: | 77 case base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE: |
78 SignalEvent(); | 78 SignalEvent(); |
79 break; | 79 break; |
80 | 80 |
81 default: | 81 default: |
82 // No action needed. | 82 // No action needed. |
83 break; | 83 break; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 results_.reset(wap::GetAssociatedSink::Results::Create("").release()); | 497 results_.reset(wap::GetAssociatedSink::Results::Create("").release()); |
498 } else { | 498 } else { |
499 results_.reset( | 499 results_.reset( |
500 wap::GetAssociatedSink::Results::Create(associated_sink_id).release()); | 500 wap::GetAssociatedSink::Results::Create(associated_sink_id).release()); |
501 } | 501 } |
502 | 502 |
503 SendResponse(true); | 503 SendResponse(true); |
504 } | 504 } |
505 | 505 |
506 } // namespace extensions | 506 } // namespace extensions |
OLD | NEW |