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

Unified Diff: Source/bindings/common/AbstractScriptValue.h

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/common/AbstractScriptPromiseResolver.h ('k') | Source/bindings/common/DeleteResult.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/common/AbstractScriptValue.h
diff --git a/Source/modules/quota/StorageQuotaClient.h b/Source/bindings/common/AbstractScriptValue.h
similarity index 54%
copy from Source/modules/quota/StorageQuotaClient.h
copy to Source/bindings/common/AbstractScriptValue.h
index a5ac3167d86e74939bc348f90e181cba9097e5eb..d9dd31e91c8b90120eb577daf027623fb8904eb4 100644
--- a/Source/modules/quota/StorageQuotaClient.h
+++ b/Source/bindings/common/AbstractScriptValue.h
@@ -28,40 +28,53 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef StorageQuotaClient_h
-#define StorageQuotaClient_h
+#ifndef AbstractScriptValue_h
+#define AbstractScriptValue_h
-#include "core/page/Page.h"
-#include "modules/ModulesExport.h"
-#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
-#include "public/platform/WebStorageQuotaType.h"
-#include "wtf/Forward.h"
+#include "wtf/PassRefPtr.h"
+#include "wtf/RefPtr.h"
+#include "wtf/text/WTFString.h"
namespace blink {
-class ExecutionContext;
-class Page;
-class ScriptPromise;
+class AbstractScriptPromise;
+class IDBKey;
+class IDBKeyPath;
+class IDBKeyRange;
+class JSONValue;
class ScriptState;
-class StorageErrorCallback;
-class StorageQuotaCallback;
-class StorageQuotaClient : public WillBeHeapSupplement<Page> {
- WTF_MAKE_NONCOPYABLE(StorageQuotaClient);
+class AbstractScriptValue : public RefCounted<AbstractScriptValue> {
+ WTF_MAKE_NONCOPYABLE(AbstractScriptValue);
public:
- StorageQuotaClient() { }
- virtual ~StorageQuotaClient() { }
+ AbstractScriptValue() { }
+ virtual ~AbstractScriptValue() { }
- virtual void requestQuota(ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, StorageQuotaCallback*, StorageErrorCallback*) = 0;
- virtual ScriptPromise requestPersistentQuota(ScriptState*, unsigned long long newQuotaInBytes) = 0;
+ virtual bool isV8() const { return false; };
+ virtual bool isDart() const { return false; };
+ virtual bool equals(AbstractScriptValue* other) const = 0;
- static const char* supplementName();
- static StorageQuotaClient* from(ExecutionContext*);
-};
+ virtual ScriptState* scriptState() const = 0;
+ virtual void clear() = 0;
+ virtual bool isObject() const = 0;
+ virtual bool isUndefined() const = 0;
+ virtual bool isFunction() const = 0;
+ virtual bool isNull() const = 0;
+ virtual bool isEmpty() const = 0;
+
+ virtual bool toString(String& result) const = 0;
+ virtual PassRefPtr<JSONValue> toJSONValue(ScriptState* state) const = 0;
-MODULES_EXPORT void provideStorageQuotaClientTo(Page&, PassOwnPtrWillBeRawPtr<StorageQuotaClient>);
+ virtual PassRefPtr<AbstractScriptPromise> toPromise() const = 0;
+ virtual PassRefPtr<AbstractScriptPromise> toRejectedPromise() const = 0;
+
+ virtual IDBKey* createIDBKeyFromKeyPath(const IDBKeyPath&) = 0;
+ virtual bool canInjectIDBKey(const IDBKeyPath&) = 0;
+ virtual IDBKey* toIDBKey() = 0;
+ virtual IDBKeyRange* toIDBKeyRange() = 0;
+};
} // namespace blink
-#endif // StorageQuotaClient_h
+#endif // AbstractScriptValue_h
« no previous file with comments | « Source/bindings/common/AbstractScriptPromiseResolver.h ('k') | Source/bindings/common/DeleteResult.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698