Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / gl / gl_context_stub_with_extensions.h
blob190e03efad3cd3a30c8cf2538bd81621d797450d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GL_GL_CONTEXT_STUB_WITH_EXTENSIONS_H_
6 #define UI_GL_GL_CONTEXT_STUB_WITH_EXTENSIONS_H_
8 #include "ui/gl/gl_context_stub.h"
10 namespace gfx {
12 // Lightweight GLContext stub implementation that returns a constructed
13 // extensions string. We use this to create a context that we can use to
14 // initialize GL extensions with, without actually creating a platform context.
15 class GL_EXPORT GLContextStubWithExtensions : public gfx::GLContextStub {
16 public:
17 GLContextStubWithExtensions() {}
18 std::string GetExtensions() override;
20 void AddExtensionsString(const char* extensions);
21 void SetGLVersionString(const char* version_str);
23 protected:
24 std::string GetGLVersion() override;
26 ~GLContextStubWithExtensions() override {}
28 private:
29 std::string extensions_;
30 std::string version_str_;
32 DISALLOW_COPY_AND_ASSIGN(GLContextStubWithExtensions);
35 } // namespace gfx
37 #endif // UI_GL_GL_CONTEXT_STUB_WITH_EXTENSIONS_H_