| 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..4fb97d725109f1ea0b8a9f48be4eb2b7b8053193
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h
|
| @@ -0,0 +1,32 @@
|
| +// 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(
|
| + std::unique_ptr<WebGraphicsContext3DProvider> provider)
|
| + : m_contextProvider(std::move(provider)), m_weakPtrFactory(this) {}
|
| + WeakPtr<WebGraphicsContext3DProviderWrapper> createWeakPtr() {
|
| + return m_weakPtrFactory.createWeakPtr();
|
| + }
|
| + WebGraphicsContext3DProvider* contextProvider() {
|
| + return m_contextProvider.get();
|
| + }
|
| +
|
| + private:
|
| + std::unique_ptr<WebGraphicsContext3DProvider> m_contextProvider;
|
| + WeakPtrFactory<WebGraphicsContext3DProviderWrapper> m_weakPtrFactory;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // WebGraphicsContext3DProviderWrapper_h
|
|
|