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

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

Issue 10692113: Wire up GetUserMedia in Chrome Frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/media_stream_manager.cc
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 3f5a8043c46d4e604fdd620b7c29428a9850fbf8..dc4111372718ad7d456e2a0db18abf7ab6330408 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -4,6 +4,8 @@
#include "content/browser/renderer_host/media/media_stream_manager.h"
+#include <objbase.h>
tommi (sloooow) - chröme 2012/07/06 22:17:09 won't this cause problems on non windows platforms
grt (UTC plus 2) 2012/07/06 23:07:25 what non-windows platforms? ;-)
+
#include <list>
#include "base/bind.h"
@@ -56,6 +58,24 @@ static bool Requested(const StreamOptions& options,
return false;
}
+DeviceThread::DeviceThread(const char* name)
+ : base::Thread(name), com_initialized_() {
+}
+
+void DeviceThread::Init() {
+ // Enter the multi-threaded apartment.
+ HRESULT hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
tommi (sloooow) - chröme 2012/07/06 22:17:09 I thought that this file was a cross platform file
+ DCHECK_EQ(hr, S_OK);
+ com_initialized_ = SUCCEEDED(hr);
+}
+
+void DeviceThread::CleanUp() {
+ if (com_initialized_) {
+ CoUninitialize();
+ com_initialized_ = false;
+ }
+}
+
// TODO(xians): Merge DeviceRequest with MediaStreamRequest.
struct MediaStreamManager::DeviceRequest {
enum RequestState {

Powered by Google App Engine
This is Rietveld 408576698