| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SKY_ENGINE_BINDINGS2_SCHEDULED_ACTION_H_ |
| 6 #define SKY_ENGINE_BINDINGS2_SCHEDULED_ACTION_H_ |
| 7 |
| 8 #include "dart/runtime/include/dart_api.h" |
| 9 #include "sky/engine/tonic/dart_persistent_value.h" |
| 10 #include "sky/engine/tonic/dart_state.h" |
| 11 #include "sky/engine/wtf/RefPtr.h" |
| 12 #include "sky/engine/wtf/PassOwnPtr.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class ExecutionContext; |
| 17 |
| 18 class ScheduledAction { |
| 19 public: |
| 20 static PassOwnPtr<ScheduledAction> Create(DartState* dart_state, |
| 21 Dart_Handle closure) { |
| 22 return adoptPtr(new ScheduledAction(dart_state, closure)); |
| 23 } |
| 24 |
| 25 ~ScheduledAction(); |
| 26 |
| 27 void Execute(ExecutionContext*); |
| 28 |
| 29 private: |
| 30 ScheduledAction(DartState* dart_state, Dart_Handle closure); |
| 31 |
| 32 DartPersistentValue closure_; |
| 33 }; |
| 34 |
| 35 } // namespace blink |
| 36 |
| 37 #endif // SKY_ENGINE_BINDINGS2_SCHEDULED_ACTION_H_ |
| OLD | NEW |