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 30 matching lines...) Expand all Loading... |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class LocalFrame; | 44 class LocalFrame; |
45 class ExecutionContext; | 45 class ExecutionContext; |
46 class WorkerGlobalScope; | 46 class WorkerGlobalScope; |
47 | 47 |
48 class ScheduledAction final : public GarbageCollectedFinalized<ScheduledAction>
{ | 48 class ScheduledAction final : public GarbageCollectedFinalized<ScheduledAction>
{ |
49 WTF_MAKE_NONCOPYABLE(ScheduledAction); | 49 WTF_MAKE_NONCOPYABLE(ScheduledAction); |
50 public: | 50 public: |
51 static RawPtr<ScheduledAction> create(ScriptState*, const ScriptValue& handl
er, const Vector<ScriptValue>& arguments); | 51 static ScheduledAction* create(ScriptState*, const ScriptValue& handler, con
st Vector<ScriptValue>& arguments); |
52 static RawPtr<ScheduledAction> create(ScriptState*, const String& handler); | 52 static ScheduledAction* create(ScriptState*, const String& handler); |
53 | 53 |
54 ~ScheduledAction(); | 54 ~ScheduledAction(); |
55 DECLARE_TRACE(); | 55 DECLARE_TRACE(); |
56 | 56 |
57 void execute(ExecutionContext*); | 57 void execute(ExecutionContext*); |
58 | 58 |
59 private: | 59 private: |
60 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip
tValue>& arguments); | 60 ScheduledAction(ScriptState*, const ScriptValue& handler, const Vector<Scrip
tValue>& arguments); |
61 ScheduledAction(ScriptState*, const String& handler); | 61 ScheduledAction(ScriptState*, const String& handler); |
62 | 62 |
63 void execute(LocalFrame*); | 63 void execute(LocalFrame*); |
64 void execute(WorkerGlobalScope*); | 64 void execute(WorkerGlobalScope*); |
65 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); | 65 void createLocalHandlesForArgs(Vector<v8::Local<v8::Value>>* handles); |
66 | 66 |
67 ScriptStateProtectingContext m_scriptState; | 67 ScriptStateProtectingContext m_scriptState; |
68 ScopedPersistent<v8::Function> m_function; | 68 ScopedPersistent<v8::Function> m_function; |
69 V8PersistentValueVector<v8::Value> m_info; | 69 V8PersistentValueVector<v8::Value> m_info; |
70 ScriptSourceCode m_code; | 70 ScriptSourceCode m_code; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
74 | 74 |
75 #endif // ScheduledAction | 75 #endif // ScheduledAction |
OLD | NEW |