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

Unified Diff: content/renderer/media/android/stream_texture_factory_synchronous_impl.h

Issue 532993002: work-in-progress patch to fix context lost black video (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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/android/stream_texture_factory_synchronous_impl.h
diff --git a/content/renderer/media/android/stream_texture_factory_synchronous_impl.h b/content/renderer/media/android/stream_texture_factory_synchronous_impl.h
index 3466c564c9b524844db26b8b819d0684c6704721..460fce7ff551fb4991c1c5926f3ab7d7e956ccd1 100644
--- a/content/renderer/media/android/stream_texture_factory_synchronous_impl.h
+++ b/content/renderer/media/android/stream_texture_factory_synchronous_impl.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "content/renderer/media/android/stream_texture_factory.h"
namespace gfx {
@@ -31,6 +32,9 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory {
virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
+ virtual void AddObserver(StreamTextureFactoryContextObserver* obs) = 0;
+ virtual void RemoveObserver(StreamTextureFactoryContextObserver* obs) = 0;
+
protected:
friend class base::RefCountedThreadSafe<ContextProvider>;
virtual ~ContextProvider() {}
@@ -51,6 +55,9 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory {
virtual void SetStreamTextureSize(int32 stream_id,
const gfx::Size& size) OVERRIDE;
virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE;
+ virtual void AddObserver(StreamTextureFactoryContextObserver* obs) OVERRIDE;
+ virtual void RemoveObserver(
+ StreamTextureFactoryContextObserver* obs) OVERRIDE;
private:
friend class base::RefCounted<StreamTextureFactorySynchronousImpl>;
@@ -62,6 +69,7 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory {
CreateContextProviderCallback create_context_provider_callback_;
scoped_refptr<ContextProvider> context_provider_;
int frame_id_;
+ StreamTextureFactoryContextObserver* observer_;
DISALLOW_IMPLICIT_CONSTRUCTORS(StreamTextureFactorySynchronousImpl);
};

Powered by Google App Engine
This is Rietveld 408576698