Index: Source/core/dom/FutureResolver.h |
diff --git a/Source/core/html/ime/Composition.h b/Source/core/dom/FutureResolver.h |
similarity index 65% |
copy from Source/core/html/ime/Composition.h |
copy to Source/core/dom/FutureResolver.h |
index 9947d2411a77f4fa0a4cd3dc9758d369a8cfaf7b..958ae6eabad5569fbdd01d01d49d9e73497f0f32 100644 |
--- a/Source/core/html/ime/Composition.h |
+++ b/Source/core/dom/FutureResolver.h |
@@ -28,33 +28,48 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef Composition_h |
-#define Composition_h |
+#ifndef FutureResolver_h |
+#define FutureResolver_h |
+#include "core/dom/Future.h" |
#include "wtf/PassRefPtr.h" |
#include "wtf/RefCounted.h" |
#include "wtf/RefPtr.h" |
namespace WebCore { |
-class Node; |
-class Range; |
+// Needed due to circular dependency. |
+class Future; |
+class ScriptValue; |
-class Composition : public RefCounted<Composition> { |
+class FutureResolver : public RefCounted<FutureResolver> { |
public: |
- static PassRefPtr<Composition> create(Node*, Range*); |
- ~Composition(); |
+ void accept(const ScriptValue&); |
+ void accept(); |
+ void reject(const ScriptValue&); |
+ void reject(); |
- Node* text() const { return m_text.get(); } |
- Range* caret() const { return m_caret.get(); } |
+ // For V8FutureResolver |
+ bool resolved() { return m_resolved; } |
+ void setResolved(bool v) { m_resolved = v; } |
+ PassRefPtr<Future> getFuture() { return m_future; } |
+ |
+ // For Future. |
+ static PassRefPtr<FutureResolver> create(PassRefPtr<Future>); |
+ void acceptInternal(const ScriptValue&, bool); |
+ void rejectInternal(const ScriptValue&, bool); |
+ |
+ // For RefCounted<FutureResolver>. |
+ virtual ~FutureResolver(); |
private: |
- Composition(Node*, Range*); |
+ explicit FutureResolver(PassRefPtr<Future>); |
- RefPtr<Node> m_text; |
- RefPtr<Range> m_caret; |
+ // The associated Future instance. |
+ RefPtr<Future> m_future; |
+ bool m_resolved; |
}; |
} // namespace WebCore |
-#endif // Composition_h |
+#endif // FutureResolver_h |