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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
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 "content/browser/renderer_host/media/video_capture_controller.h" 5 #include "content/browser/renderer_host/media/video_capture_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 continue; 477 continue;
478 client->event_handler->OnError(client->controller_id); 478 client->event_handler->OnError(client->controller_id);
479 } 479 }
480 } 480 }
481 481
482 void VideoCaptureController::OnLog(const std::string& message) { 482 void VideoCaptureController::OnLog(const std::string& message) {
483 DCHECK_CURRENTLY_ON(BrowserThread::IO); 483 DCHECK_CURRENTLY_ON(BrowserThread::IO);
484 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message); 484 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message);
485 } 485 }
486 486
487 void VideoCaptureController::OnStarted() {
488 DCHECK_CURRENTLY_ON(BrowserThread::IO);
489 state_ = VIDEO_CAPTURE_STATE_STARTED;
490
491 for (const auto& client : controller_clients_) {
492 if (client->session_closed)
493 continue;
494 client->event_handler->OnStarted(client->controller_id);
495 }
496 }
497
487 void VideoCaptureController::OnBufferDestroyed(int buffer_id_to_drop) { 498 void VideoCaptureController::OnBufferDestroyed(int buffer_id_to_drop) {
488 DCHECK_CURRENTLY_ON(BrowserThread::IO); 499 DCHECK_CURRENTLY_ON(BrowserThread::IO);
489 500
490 for (const auto& client : controller_clients_) { 501 for (const auto& client : controller_clients_) {
491 if (client->session_closed) 502 if (client->session_closed)
492 continue; 503 continue;
493 504
494 auto known_buffers_entry_iter = 505 auto known_buffers_entry_iter =
495 std::find(std::begin(client->known_buffers), 506 std::find(std::begin(client->known_buffers),
496 std::end(client->known_buffers), buffer_id_to_drop); 507 std::end(client->known_buffers), buffer_id_to_drop);
(...skipping 22 matching lines...) Expand all
519 int session_id, 530 int session_id,
520 const ControllerClients& clients) { 531 const ControllerClients& clients) {
521 for (const auto& client : clients) { 532 for (const auto& client : clients) {
522 if (client->session_id == session_id) 533 if (client->session_id == session_id)
523 return client.get(); 534 return client.get();
524 } 535 }
525 return nullptr; 536 return nullptr;
526 } 537 }
527 538
528 } // namespace content 539 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698