| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 class JSONValue; | 40 class JSONValue; |
| 41 class ScriptState; | 41 class ScriptState; |
| 42 | 42 |
| 43 class AbstractScriptValue : public RefCounted<AbstractScriptValue> { | 43 class AbstractScriptValue : public RefCounted<AbstractScriptValue> { |
| 44 WTF_MAKE_NONCOPYABLE(AbstractScriptValue); | 44 WTF_MAKE_NONCOPYABLE(AbstractScriptValue); |
| 45 public: | 45 public: |
| 46 AbstractScriptValue() {} | 46 AbstractScriptValue() {} |
| 47 virtual ~AbstractScriptValue() {} | 47 virtual ~AbstractScriptValue() {} |
| 48 | 48 |
| 49 virtual bool isV8() const = 0; | 49 virtual bool isV8() const { return false; }; |
| 50 virtual bool isDart() const { return false; }; |
| 50 virtual bool equals(AbstractScriptValue* other) const = 0; | 51 virtual bool equals(AbstractScriptValue* other) const = 0; |
| 51 | 52 |
| 52 virtual void clear() = 0; | 53 virtual void clear() = 0; |
| 53 virtual bool isObject() const = 0; | 54 virtual bool isObject() const = 0; |
| 54 virtual bool isUndefined() const = 0; | 55 virtual bool isUndefined() const = 0; |
| 55 virtual bool isFunction() const = 0; | 56 virtual bool isFunction() const = 0; |
| 56 virtual bool isNull() const = 0; | 57 virtual bool isNull() const = 0; |
| 57 virtual bool hasNoValue() const = 0; | 58 virtual bool hasNoValue() const = 0; |
| 58 | 59 |
| 59 virtual bool getString(String& result) const = 0; | 60 virtual bool getString(String& result) const = 0; |
| 60 virtual String toString() const = 0; | 61 virtual String toString() const = 0; |
| 61 virtual PassRefPtr<JSONValue> toJSONValue(ScriptState* state) const = 0; | 62 virtual PassRefPtr<JSONValue> toJSONValue(ScriptState* state) const = 0; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace WebCore | 65 } // namespace WebCore |
| 65 | 66 |
| 66 #endif // AbstractScriptValue_h | 67 #endif // AbstractScriptValue_h |
| OLD | NEW |