Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / experimental / SkV8Example / JsContext.h
index d3993ee..a6b5e4c 100644 (file)
@@ -13,9 +13,7 @@
 #include <v8.h>
 
 #include "SkPaint.h"
-#include "BaseContext.h"
-
-using namespace v8;
+#include "DrawingMethods.h"
 
 class SkCanvas;
 class Global;
@@ -27,7 +25,7 @@ class Global;
 //    context.fillStyle="#FF0000";
 //    context.fillRect(x, y, w, h);
 //  }
-class JsContext : public BaseContext {
+class JsContext : public DrawingMethods {
 public:
     JsContext(Global* global)
             : INHERITED(global)
@@ -47,19 +45,19 @@ public:
 private:
 
     // Wrap the 'this' pointer into an Object. Can be retrieved via Unwrap.
-    Handle<Object> wrap();
+    v8::Handle<v8::Object> wrap();
 
     // A handle to the onDraw function defined in the script.
-    Persistent<Function> fOnDraw;
+    v8::Persistent<v8::Function> fOnDraw;
 
     // The template for what a canvas context object looks like. The canvas
     // context object is what's passed into the JS onDraw() function.
-    static Persistent<ObjectTemplate> gContextTemplate;
+    static v8::Persistent<v8::ObjectTemplate> gContextTemplate;
 
     // Only valid when inside OnDraw().
     SkCanvas* fCanvas;
 
-    typedef BaseContext INHERITED;
+    typedef DrawingMethods INHERITED;
 };
 
 #endif