| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ | 5 #ifndef MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ |
| 6 #define MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ | 6 #define MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 57 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| 58 v8::Isolate* isolate) OVERRIDE; | 58 v8::Isolate* isolate) OVERRIDE; |
| 59 | 59 |
| 60 explicit Context(v8::Isolate* isolate, | 60 explicit Context(v8::Isolate* isolate, |
| 61 mojo::Handle handle, | 61 mojo::Handle handle, |
| 62 v8::Handle<v8::Function> did_create_callback); | 62 v8::Handle<v8::Function> did_create_callback); |
| 63 virtual ~Context(); | 63 virtual ~Context(); |
| 64 | 64 |
| 65 void DidCreateContext(uint32_t width, uint32_t height); | 65 void DidCreateContext(); |
| 66 static void DidCreateContextThunk( | 66 static void DidCreateContextThunk(void* closure); |
| 67 void* closure, | |
| 68 uint32_t width, | |
| 69 uint32_t height); | |
| 70 void ContextLost(); | 67 void ContextLost(); |
| 71 static void ContextLostThunk(void* closure); | 68 static void ContextLostThunk(void* closure); |
| 72 | 69 |
| 73 base::WeakPtr<gin::Runner> runner_; | 70 base::WeakPtr<gin::Runner> runner_; |
| 74 v8::Persistent<v8::Function> did_create_callback_; | 71 v8::Persistent<v8::Function> did_create_callback_; |
| 75 MojoGLES2Context context_; | 72 MojoGLES2Context context_; |
| 76 }; | 73 }; |
| 77 | 74 |
| 78 } // namespace gl | 75 } // namespace gl |
| 79 } // namespace js | 76 } // namespace js |
| 80 } // namespace mojo | 77 } // namespace mojo |
| 81 | 78 |
| 82 #endif // MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ | 79 #endif // MOJO_APPS_JS_BINDINGS_GL_CONTEXT_H_ |
| OLD | NEW |