Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webgl/WebGLContextProviderCreationInfo.h |
| diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextProviderCreationInfo.h b/third_party/WebKit/Source/modules/webgl/WebGLContextProviderCreationInfo.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..66366b43fcff3e9d578dc4390be7ae3b378ba82f |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/webgl/WebGLContextProviderCreationInfo.h |
| @@ -0,0 +1,37 @@ |
| +// 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 WebGLContextProviderCreationInfo_h |
| +#define WebGLContextProviderCreationInfo_h |
| + |
| +#include "bindings/core/v8/ScriptState.h" |
| +#include "modules/ModulesExport.h" |
| +#include "public/platform/Platform.h" |
| +#include "public/platform/WebGraphicsContext3DProvider.h" |
| + |
| +namespace blink { |
| + |
| +class MODULES_EXPORT WebGLContextProviderCreationInfo { |
|
sof
2016/05/08 07:05:00
This class can be made local to WebGLRenderingCont
xidachen
2016/05/08 17:17:45
Sorry, I must have mis-interpret your previous com
sof
2016/05/08 17:30:21
WebGLRenderingContextBase.h:
class WebGLRendering
xidachen
2016/05/08 18:04:53
Thank you. I have made changes accordingly. Also,
|
| +public: |
| + WebGLContextProviderCreationInfo(Platform::ContextAttributes contextAttributes, Platform::GraphicsInfo glInfo, ScriptState* scriptState) |
| + { |
| + m_contextAttributes = contextAttributes; |
| + m_glInfo = glInfo; |
| + m_scriptState = scriptState; |
| + } |
| + Platform::ContextAttributes contextAttributes() { return m_contextAttributes; } |
| + Platform::GraphicsInfo glInfo() { return m_glInfo; } |
| + ScriptState* scriptState() { return m_scriptState; } |
| + void setContextProvider(PassOwnPtr<WebGraphicsContext3DProvider> provider) { m_provider = std::move(provider); } |
| + PassOwnPtr<WebGraphicsContext3DProvider> releaseContextProvider() { return m_provider.release(); } |
| +private: |
| + Platform::ContextAttributes m_contextAttributes; |
| + Platform::GraphicsInfo m_glInfo; |
| + ScriptState* m_scriptState; |
| + OwnPtr<WebGraphicsContext3DProvider> m_provider; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WebGLContextProviderCreationInfo_h |