Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Side by Side Diff: Source/bindings/common/AbstractScriptValue.h

Issue 289083003: [dartium] Dart half of ScriptValue refactoring. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1916
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/common/ScriptValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/common/ScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698