Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: services/video_capture/public/cpp/device_to_feedback_observer_adapter.cc

Issue 2824883005: [Mojo Video Capture] Stop service when last client disconnects. (Closed)
Patch Set: Incorporate suggestions from PatchSet 1 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/video_capture/public/cpp/device_to_feedback_observer_adapter. h" 5 #include "services/video_capture/public/cpp/device_to_feedback_observer_adapter. h"
6 6
7 namespace video_capture { 7 namespace video_capture {
8 8
9 DeviceToFeedbackObserverAdapter::DeviceToFeedbackObserverAdapter( 9 DeviceToFeedbackObserverAdapter::DeviceToFeedbackObserverAdapter(
10 mojom::DevicePtr device) 10 mojom::DevicePtr* device)
11 : device_(std::move(device)) {} 11 : device_(std::move(device)) {}
12 12
13 DeviceToFeedbackObserverAdapter::~DeviceToFeedbackObserverAdapter() = default; 13 DeviceToFeedbackObserverAdapter::~DeviceToFeedbackObserverAdapter() = default;
14 14
15 void DeviceToFeedbackObserverAdapter::OnUtilizationReport(int frame_feedback_id, 15 void DeviceToFeedbackObserverAdapter::OnUtilizationReport(int frame_feedback_id,
16 double utilization) { 16 double utilization) {
17 device_->OnReceiverReportingUtilization(frame_feedback_id, utilization); 17 (*device_)->OnReceiverReportingUtilization(frame_feedback_id, utilization);
18 } 18 }
19 19
20 } // namespace video_capture 20 } // namespace video_capture
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698