| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 * | 7 * |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #ifndef SkV8Example_DEFINED | 10 #ifndef SkV8Example_DEFINED |
| 11 #define SkV8Example_DEFINED | 11 #define SkV8Example_DEFINED |
| 12 | 12 |
| 13 #include <v8.h> |
| 14 |
| 13 #include "SkWindow.h" | 15 #include "SkWindow.h" |
| 14 | 16 |
| 17 |
| 18 using namespace v8; |
| 19 |
| 20 |
| 15 class SkCanvas; | 21 class SkCanvas; |
| 16 | 22 |
| 17 | 23 |
| 18 class SkV8ExampleWindow : public SkOSWindow { | 24 class SkV8ExampleWindow : public SkOSWindow { |
| 19 public: | 25 public: |
| 20 SkV8ExampleWindow(void* hwnd); | 26 SkV8ExampleWindow(void* hwnd, |
| 27 Isolate* isolate, |
| 28 Handle<Context> context, |
| 29 Handle<Script> script); |
| 21 | 30 |
| 22 | 31 |
| 23 protected: | 32 protected: |
| 24 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; | 33 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE; |
| 25 | 34 |
| 26 | 35 |
| 36 |
| 27 #ifdef SK_BUILD_FOR_WIN | 37 #ifdef SK_BUILD_FOR_WIN |
| 28 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE; | 38 virtual void onHandleInval(const SkIRect&) SK_OVERRIDE; |
| 29 #endif | 39 #endif |
| 30 | 40 |
| 31 private: | 41 private: |
| 32 typedef SkOSWindow INHERITED; | 42 typedef SkOSWindow INHERITED; |
| 43 Isolate* fIsolate; |
| 44 Persistent<Context> fContext; |
| 45 Persistent<Script> fScript; |
| 46 SkScalar fRotationAngle; |
| 33 }; | 47 }; |
| 34 | 48 |
| 35 #endif | 49 #endif |
| OLD | NEW |