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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 8037055: Add OnRemoved() in VideoCapture::EventHandler API (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/renderer/media/video_capture_impl.cc
===================================================================
--- content/renderer/media/video_capture_impl.cc (revision 102594)
+++ content/renderer/media/video_capture_impl.cc (working copy)
@@ -144,6 +144,7 @@
if (it != pending_clients_.end()) {
handler->OnError(this, 1);
+ handler->OnRemoved(this);
return;
}
@@ -157,6 +158,7 @@
capability.height != current_params_.height)) {
// Can't have 2 master clients with different resolutions.
handler->OnError(this, 1);
+ handler->OnRemoved(this);
return;
}
@@ -219,6 +221,7 @@
ClientInfo::iterator it = pending_clients_.find(handler);
if (it != pending_clients_.end()) {
handler->OnStopped(this);
+ handler->OnRemoved(this);
pending_clients_.erase(it);
return;
}
@@ -227,6 +230,7 @@
return;
handler->OnStopped(this);
+ handler->OnRemoved(this);
clients_.erase(handler);
master_clients_.remove(handler);
@@ -368,7 +372,12 @@
it != clients_.end(); it++) {
// TODO(wjia): browser process would send error code.
it->first->OnError(this, 1);
+ it->first->OnRemoved(this);
}
+ clients_.clear();
+ master_clients_.clear();
+ state_ = kStopped;
+ current_params_.width = current_params_.height = 0;
break;
default:
break;

Powered by Google App Engine
This is Rietveld 408576698