summaryrefslogtreecommitdiffstats
path: root/content/common/android/surface_texture_bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/android/surface_texture_bridge.h')
-rw-r--r--content/common/android/surface_texture_bridge.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/common/android/surface_texture_bridge.h b/content/common/android/surface_texture_bridge.h
index 5024234..97e8ef6 100644
--- a/content/common/android/surface_texture_bridge.h
+++ b/content/common/android/surface_texture_bridge.h
@@ -9,15 +9,16 @@
#include "base/android/scoped_java_ref.h"
#include "base/callback.h"
+#include "base/memory/ref_counted.h"
namespace content {
// This class serves as a bridge for native code to call java functions inside
// android SurfaceTexture class.
-class SurfaceTextureBridge {
+class SurfaceTextureBridge
+ : public base::RefCountedThreadSafe<SurfaceTextureBridge>{
public:
explicit SurfaceTextureBridge(int texture_id);
- ~SurfaceTextureBridge();
// Set the listener callback, which will be invoked on the same thread that
// is being called from here for registration.
@@ -45,6 +46,9 @@ class SurfaceTextureBridge {
}
private:
+ friend class base::RefCountedThreadSafe<SurfaceTextureBridge>;
+ ~SurfaceTextureBridge();
+
const int texture_id_;
// Java SurfaceTexture instance.