Index: third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h |
diff --git a/third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h b/third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b0a0e9a789ce52ea58e13f7c1a8d0677f82aa6ec |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2016 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 WebGraphicsContext3DProviderWrapper_h |
+#define WebGraphicsContext3DProviderWrapper_h |
+ |
+#include "public/platform/WebGraphicsContext3DProvider.h" |
+#include "wtf/WeakPtr.h" |
+ |
+namespace blink { |
+ |
+class PLATFORM_EXPORT WebGraphicsContext3DProviderWrapper { |
+ public: |
+ WebGraphicsContext3DProviderWrapper(WebGraphicsContext3DProvider* provider) |
+ : m_contextProvider(provider), m_weakPtrFactory(this) {} |
+ WeakPtr<WebGraphicsContext3DProviderWrapper> createWeakPtr() { |
+ return m_weakPtrFactory.createWeakPtr(); |
+ } |
+ WebGraphicsContext3DProvider* contextProvider() { return m_contextProvider; } |
+ |
+ private: |
+ WebGraphicsContext3DProvider* m_contextProvider; |
Justin Novosad
2016/11/08 19:38:54
This is your problem: this is supposed to be a uni
xidachen
2016/11/08 20:30:58
Yeah, that makes perfect sense. After I made this
|
+ WeakPtrFactory<WebGraphicsContext3DProviderWrapper> m_weakPtrFactory; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // WebGraphicsContext3DProviderWrapper_h |