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 27 matching lines...) Expand all Loading... |
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 WorkerContext; |
45 | 45 |
46 class ScheduledAction { | 46 class ScheduledAction { |
47 public: | 47 public: |
48 ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc,
v8::Handle<v8::Value> argv[]); | 48 ScheduledAction(v8::Handle<v8::Context>, v8::Handle<v8::Function>, int argc,
v8::Handle<v8::Value> argv[], v8::Isolate*); |
| 49 ScheduledAction(v8::Handle<v8::Context>, const String&, const KURL&, v8::Iso
late*); |
| 50 ~ScheduledAction(); |
49 | 51 |
50 ScheduledAction(v8::Handle<v8::Context> context, const String& code, const K
URL& url = KURL()) | |
51 : m_context(context) | |
52 , m_code(code, url) | |
53 { | |
54 } | |
55 | |
56 ~ScheduledAction(); | |
57 void execute(ScriptExecutionContext*); | 52 void execute(ScriptExecutionContext*); |
58 | 53 |
59 private: | 54 private: |
60 void execute(Frame*); | 55 void execute(Frame*); |
61 #if ENABLE(WORKERS) | 56 #if ENABLE(WORKERS) |
62 void execute(WorkerContext*); | 57 void execute(WorkerContext*); |
63 #endif | 58 #endif |
64 | 59 |
65 ScopedPersistent<v8::Context> m_context; | 60 ScopedPersistent<v8::Context> m_context; |
66 ScopedPersistent<v8::Function> m_function; | 61 ScopedPersistent<v8::Function> m_function; |
67 Vector<v8::Persistent<v8::Value> > m_args; | 62 Vector<v8::Persistent<v8::Value> > m_args; |
68 ScriptSourceCode m_code; | 63 ScriptSourceCode m_code; |
| 64 v8::Isolate* m_isolate; |
69 }; | 65 }; |
70 | 66 |
71 } // namespace WebCore | 67 } // namespace WebCore |
72 | 68 |
73 #endif // ScheduledAction | 69 #endif // ScheduledAction |
OLD | NEW |