| Index: mojo/apps/js/bindings/gl/context.cc
|
| diff --git a/mojo/apps/js/bindings/gl/context.cc b/mojo/apps/js/bindings/gl/context.cc
|
| index efba8e534d05ab1963e26a459bf0c3ef2535378e..c0bb74a4dbe2effa906392434fa9878478e2f932 100644
|
| --- a/mojo/apps/js/bindings/gl/context.cc
|
| +++ b/mojo/apps/js/bindings/gl/context.cc
|
| @@ -21,16 +21,6 @@ gin::Handle<Context> Context::Create(v8::Isolate* isolate, uint64_t encoded,
|
| return gin::CreateHandle(isolate, new Context(encoded, width, height));
|
| }
|
|
|
| -v8::Local<v8::ObjectTemplate> Context::GetObjectTemplate(
|
| - v8::Isolate* isolate) {
|
| - return gin::ObjectTemplateBuilder(isolate)
|
| - .SetValue("VERTEX_SHADER", GL_VERTEX_SHADER)
|
| - .SetMethod("createShader", CreateShader)
|
| - .SetMethod("shaderSource", ShaderSource)
|
| - .SetMethod("compileShader", CompileShader)
|
| - .Build();
|
| -}
|
| -
|
| gin::Handle<Shader> Context::CreateShader(const gin::Arguments& args,
|
| GLenum type) {
|
| gin::Handle<Shader> result;
|
| @@ -60,6 +50,15 @@ void Context::CompileShader(const gin::Arguments& args,
|
| }
|
| }
|
|
|
| +gin::ObjectTemplateBuilder Context::GetObjectTemplateBuilder(
|
| + v8::Isolate* isolate) {
|
| + return gin::Wrappable<Context>::GetObjectTemplateBuilder(isolate)
|
| + .SetValue("VERTEX_SHADER", GL_VERTEX_SHADER)
|
| + .SetMethod("createShader", CreateShader)
|
| + .SetMethod("shaderSource", ShaderSource)
|
| + .SetMethod("compileShader", CompileShader);
|
| +}
|
| +
|
| Context::Context(uint64_t encoded, int width, int height)
|
| : encoded_(encoded) {
|
| // TODO(aa): When we want to support multiple contexts, we should add
|
|
|