OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "bindings/v8/ScopedPersistent.h" | 34 #include "bindings/v8/ScopedPersistent.h" |
35 #include "bindings/v8/ScriptSourceCode.h" | 35 #include "bindings/v8/ScriptSourceCode.h" |
36 #include <v8.h> | 36 #include <v8.h> |
37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class Frame; | 42 class Frame; |
43 class ScriptExecutionContext; | 43 class ScriptExecutionContext; |
44 class WorkerContext; | 44 class WorkerGlobalScope; |
45 | 45 |
46 class ScheduledAction { | 46 class ScheduledAction { |
47 WTF_MAKE_NONCOPYABLE(ScheduledAction); | 47 WTF_MAKE_NONCOPYABLE(ScheduledAction); |
48 public: | 48 public: |
49 ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc,
v8::Handle<v8::Value> argv[], v8::Isolate*); | 49 ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc,
v8::Handle<v8::Value> argv[], v8::Isolate*); |
50 ScheduledAction(v8::Handle<v8::Context>, const String&, const KURL&, v8::Iso
late*); | 50 ScheduledAction(v8::Handle<v8::Context>, const String&, const KURL&, v8::Iso
late*); |
51 ~ScheduledAction(); | 51 ~ScheduledAction(); |
52 | 52 |
53 void execute(ScriptExecutionContext*); | 53 void execute(ScriptExecutionContext*); |
54 | 54 |
55 private: | 55 private: |
56 void execute(Frame*); | 56 void execute(Frame*); |
57 void execute(WorkerContext*); | 57 void execute(WorkerGlobalScope*); |
58 void createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >* handles); | 58 void createLocalHandlesForArgs(Vector<v8::Handle<v8::Value> >* handles); |
59 | 59 |
60 ScopedPersistent<v8::Context> m_context; | 60 ScopedPersistent<v8::Context> m_context; |
61 ScopedPersistent<v8::Function> m_function; | 61 ScopedPersistent<v8::Function> m_function; |
62 Vector<UnsafePersistent<v8::Value> > m_args; | 62 Vector<UnsafePersistent<v8::Value> > m_args; |
63 ScriptSourceCode m_code; | 63 ScriptSourceCode m_code; |
64 v8::Isolate* m_isolate; | 64 v8::Isolate* m_isolate; |
65 }; | 65 }; |
66 | 66 |
67 } // namespace WebCore | 67 } // namespace WebCore |
68 | 68 |
69 #endif // ScheduledAction | 69 #endif // ScheduledAction |
OLD | NEW |