Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: experimental/SkV8Example/Global.h

Issue 673223002: Get SkV8Example running again. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/SkV8Example/BaseContext.cpp ('k') | experimental/SkV8Example/Global.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkV8Example/Global.h
diff --git a/experimental/SkV8Example/Global.h b/experimental/SkV8Example/Global.h
index 6bd3c7096239dc65bde1dde8f69c070265adcf2e..a50f24442ae133b8d16398358ac492f9fdb2acb7 100644
--- a/experimental/SkV8Example/Global.h
+++ b/experimental/SkV8Example/Global.h
@@ -14,20 +14,19 @@
#include <v8.h>
-using namespace v8;
#include "SkTypes.h"
#include "SkEvent.h"
class SkOSWindow;
-typedef Persistent<Function, CopyablePersistentTraits<Function> > CopyablePersistentFn;
+typedef v8::Persistent<v8::Function, v8::CopyablePersistentTraits<v8::Function> > CopyablePersistentFn;
// Provides the global isolate and context for our V8 instance.
// Also implements all the global level functions.
class Global : SkNoncopyable {
public:
- Global(Isolate* isolate)
+ Global(v8::Isolate* isolate)
: fIsolate(isolate)
, fWindow(NULL)
, fLastTimerID(0)
@@ -40,11 +39,11 @@ public:
// The script will be parsed into the context this Global contains.
bool parseScript(const char script[]);
- Local<Context> getContext() {
- return Local<Context>::New(fIsolate, fContext);
+ v8::Local<v8::Context> getContext() {
+ return v8::Local<v8::Context>::New(fIsolate, fContext);
}
- Isolate* getIsolate() {
+ v8::Isolate* getIsolate() {
return fIsolate;
}
@@ -55,11 +54,11 @@ public:
return fWindow;
}
- void reportException(TryCatch* tryCatch);
+ void reportException(v8::TryCatch* tryCatch);
private:
void initialize();
- Handle<Context> createRootContext();
+ v8::Handle<v8::Context> createRootContext();
int32_t getNextTimerID();
static bool TimeOutProc(const SkEvent& evt);
@@ -68,12 +67,12 @@ private:
// the context.
static void SetTimeout(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Print(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void Inval(const v8::FunctionCallbackInfo<Value>& args);
+ static void Inval(const v8::FunctionCallbackInfo<v8::Value>& args);
- Persistent<Context> fContext;
- Isolate* fIsolate;
- SkOSWindow* fWindow;
- static Global* gGlobal;
+ v8::Persistent<v8::Context> fContext;
+ v8::Isolate* fIsolate;
+ SkOSWindow* fWindow;
+ static Global* gGlobal;
// Handle to the functions to call when a timeout triggers as indexed by id.
std::map<int32_t, CopyablePersistentFn > fTimeouts;
« no previous file with comments | « experimental/SkV8Example/BaseContext.cpp ('k') | experimental/SkV8Example/Global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698