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

Unified Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#6 and restore added state check in frame callback. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_controller.cc
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index 6d12e40bac04bd0b369c4a3a952206eb0b8efa07..fa67cc871509f61a920c7608d2303dc0096242dd 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -471,6 +471,17 @@ void VideoCaptureController::OnLog(const std::string& message) {
MediaStreamManager::SendMessageToNativeLog("Video capture: " + message);
}
+void VideoCaptureController::OnStarted() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ state_ = VIDEO_CAPTURE_STATE_STARTED;
chfremer 2017/02/22 19:13:58 Why are we setting this here? Looking at the usag
braveyao 2017/02/23 00:06:25 Done. You're right. No need here.
+
+ for (const auto& client : controller_clients_) {
+ if (client->session_closed)
+ continue;
+ client->event_handler->OnStarted(client->controller_id);
+ }
+}
+
void VideoCaptureController::OnBufferRetired(int buffer_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

Powered by Google App Engine
This is Rietveld 408576698