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

Unified Diff: content/renderer/media/media_stream_source_observer.h

Issue 14346002: Connect webrtc MediaSourceInterface ready states with webkit WebMediaStreamSource (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: revised according to comments from tommi Created 7 years, 8 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/media_stream_source_observer.h
diff --git a/content/renderer/media/media_stream_source_observer.h b/content/renderer/media/media_stream_source_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b8a363d00795bfd91165f0765d34ade077a50b2e
--- /dev/null
+++ b/content/renderer/media/media_stream_source_observer.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_
+#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/non_thread_safe.h"
+#include "content/common/content_export.h"
+#include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSource.h"
+
+namespace content {
+
+class MediaStreamSourceExtraData;
+
+// MediaStreamSourceObserver listens to events on MediaSourceInterface and
+// notify WebKit. It will be owned by MediaStreamSourceExtraData.
+class CONTENT_EXPORT MediaStreamSourceObserver
+ : NON_EXPORTED_BASE(public webrtc::ObserverInterface),
+ NON_EXPORTED_BASE(public base::NonThreadSafe) {
+ public:
+ MediaStreamSourceObserver(webrtc::MediaSourceInterface* webrtc_source,
+ MediaStreamSourceExtraData* extra_data);
+ virtual ~MediaStreamSourceObserver();
+
+ private:
+ // webrtc::ObserverInterface implementation.
+ virtual void OnChanged() OVERRIDE;
+
+ webrtc::MediaSourceInterface::SourceState state_;
+ scoped_refptr<webrtc::MediaSourceInterface> webrtc_source_;
+ MediaStreamSourceExtraData* extra_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaStreamSourceObserver);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_SOURCE_OBSERVER_H_
« no previous file with comments | « content/renderer/media/media_stream_source_extra_data.h ('k') | content/renderer/media/media_stream_source_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698