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

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

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#8 Created 3 years, 9 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 continue; 454 continue;
455 client->event_handler->OnError(client->controller_id); 455 client->event_handler->OnError(client->controller_id);
456 } 456 }
457 } 457 }
458 458
459 void VideoCaptureController::OnLog(const std::string& message) { 459 void VideoCaptureController::OnLog(const std::string& message) {
460 DCHECK_CURRENTLY_ON(BrowserThread::IO); 460 DCHECK_CURRENTLY_ON(BrowserThread::IO);
461 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message); 461 MediaStreamManager::SendMessageToNativeLog("Video capture: " + message);
462 } 462 }
463 463
464 void VideoCaptureController::OnStarted() {
465 DCHECK_CURRENTLY_ON(BrowserThread::IO);
466
467 for (const auto& client : controller_clients_) {
468 if (client->session_closed)
469 continue;
470 client->event_handler->OnStarted(client->controller_id);
471 }
472 }
473
464 VideoCaptureController::ControllerClient* VideoCaptureController::FindClient( 474 VideoCaptureController::ControllerClient* VideoCaptureController::FindClient(
465 VideoCaptureControllerID id, 475 VideoCaptureControllerID id,
466 VideoCaptureControllerEventHandler* handler, 476 VideoCaptureControllerEventHandler* handler,
467 const ControllerClients& clients) { 477 const ControllerClients& clients) {
468 for (const auto& client : clients) { 478 for (const auto& client : clients) {
469 if (client->controller_id == id && client->event_handler == handler) 479 if (client->controller_id == id && client->event_handler == handler)
470 return client.get(); 480 return client.get();
471 } 481 }
472 return nullptr; 482 return nullptr;
473 } 483 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (entry_iter != std::end(client->known_buffer_context_ids)) { 537 if (entry_iter != std::end(client->known_buffer_context_ids)) {
528 client->known_buffer_context_ids.erase(entry_iter); 538 client->known_buffer_context_ids.erase(entry_iter);
529 client->event_handler->OnBufferDestroyed( 539 client->event_handler->OnBufferDestroyed(
530 client->controller_id, buffer_context_iter->buffer_context_id()); 540 client->controller_id, buffer_context_iter->buffer_context_id());
531 } 541 }
532 } 542 }
533 buffer_contexts_.erase(buffer_context_iter); 543 buffer_contexts_.erase(buffer_context_iter);
534 } 544 }
535 545
536 } // namespace content 546 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698