OLD | NEW |
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 #include "remoting/host/ipc_audio_capturer.h" | 5 #include "remoting/host/ipc_audio_capturer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "remoting/host/desktop_session_proxy.h" | 9 #include "remoting/host/desktop_session_proxy.h" |
10 #include "remoting/proto/audio.pb.h" | 10 #include "remoting/proto/audio.pb.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 bool IpcAudioCapturer::Start(const PacketCapturedCallback& callback) { | 23 bool IpcAudioCapturer::Start(const PacketCapturedCallback& callback) { |
24 DCHECK(callback_.is_null()); | 24 DCHECK(callback_.is_null()); |
25 DCHECK(!callback.is_null()); | 25 DCHECK(!callback.is_null()); |
26 | 26 |
27 callback_ = callback; | 27 callback_ = callback; |
28 desktop_session_proxy_->SetAudioCapturer(weak_factory_.GetWeakPtr()); | 28 desktop_session_proxy_->SetAudioCapturer(weak_factory_.GetWeakPtr()); |
29 return true; | 29 return true; |
30 } | 30 } |
31 | 31 |
32 void IpcAudioCapturer::OnAudioPacket(scoped_ptr<AudioPacket> packet) { | 32 void IpcAudioCapturer::OnAudioPacket(std::unique_ptr<AudioPacket> packet) { |
33 callback_.Run(std::move(packet)); | 33 callback_.Run(std::move(packet)); |
34 } | 34 } |
35 | 35 |
36 } // namespace remoting | 36 } // namespace remoting |
OLD | NEW |