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

Side by Side Diff: public/platform/WebIDBCallbacks.h

Issue 18590006: Blob support for IDB [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge fixes [builds, untested] Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef WebIDBCallbacks_h 26 #ifndef WebIDBCallbacks_h
27 #define WebIDBCallbacks_h 27 #define WebIDBCallbacks_h
28 28
29 #include "WebCommon.h" 29 #include "WebCommon.h"
30 #include "WebVector.h" 30 #include "WebVector.h"
31 31
32 namespace WebKit { 32 namespace WebKit {
33 33
34 class WebBlobInfo;
34 class WebData; 35 class WebData;
35 class WebIDBCursor; 36 class WebIDBCursor;
36 class WebIDBDatabase; 37 class WebIDBDatabase;
37 class WebIDBDatabaseError; 38 class WebIDBDatabaseError;
38 class WebIDBIndex; 39 class WebIDBIndex;
39 class WebIDBKey; 40 class WebIDBKey;
40 class WebIDBKeyPath; 41 class WebIDBKeyPath;
41 class WebString; 42 class WebString;
42 struct WebIDBMetadata; 43 struct WebIDBMetadata;
43 44
44 class WebIDBCallbacks { 45 class WebIDBCallbacks {
45 public: 46 public:
46 virtual ~WebIDBCallbacks() { } 47 virtual ~WebIDBCallbacks() { }
47 48
48 enum DataLoss { 49 enum DataLoss {
49 DataLossNone = 0, 50 DataLossNone = 0,
50 DataLossTotal = 1 51 DataLossTotal = 1
51 }; 52 };
52 53
53 // For classes that follow the PImpl pattern, pass a const reference. 54 // For classes that follow the PImpl pattern, pass a const reference.
54 // For the rest, pass ownership to the callee via a pointer. 55 // For the rest, pass ownership to the callee via a pointer.
55 virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED (); } 56 virtual void onError(const WebIDBDatabaseError&) { WEBKIT_ASSERT_NOT_REACHED (); }
56 virtual void onSuccess(const WebVector<WebString>&) { WEBKIT_ASSERT_NOT_REAC HED(); } 57 virtual void onSuccess(const WebVector<WebString>&) { WEBKIT_ASSERT_NOT_REAC HED(); }
57 virtual void onSuccess(WebIDBCursor*, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData&) { WEBKIT_ASSERT_NOT_REACHED(); } 58 virtual void onSuccess(WebIDBCursor*, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData&, const WebVector<WebBlobInfo>&) { WEBKIT_ASSERT_NOT_ REACHED(); }
58 virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); } 59 virtual void onSuccess(WebIDBDatabase*) { WEBKIT_ASSERT_NOT_REACHED(); }
59 virtual void onSuccess(WebIDBDatabase*, const WebIDBMetadata&) { WEBKIT_ASSE RT_NOT_REACHED(); } 60 virtual void onSuccess(WebIDBDatabase*, const WebIDBMetadata&) { WEBKIT_ASSE RT_NOT_REACHED(); }
60 virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); } 61 virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); }
61 virtual void onSuccess(const WebData&) { WEBKIT_ASSERT_NOT_REACHED(); } 62 virtual void onSuccess(const WebData&, const WebVector<WebBlobInfo>&) { WEBK IT_ASSERT_NOT_REACHED(); }
62 virtual void onSuccess(const WebData&, const WebIDBKey&, const WebIDBKeyPath &) { WEBKIT_ASSERT_NOT_REACHED(); } 63 virtual void onSuccess(const WebData&, const WebVector<WebBlobInfo>&, const WebIDBKey&, const WebIDBKeyPath&) { WEBKIT_ASSERT_NOT_REACHED(); }
63 virtual void onSuccess(long long) { WEBKIT_ASSERT_NOT_REACHED(); } 64 virtual void onSuccess(long long) { WEBKIT_ASSERT_NOT_REACHED(); }
64 virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); } 65 virtual void onSuccess() { WEBKIT_ASSERT_NOT_REACHED(); }
65 virtual void onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, co nst WebData&) { WEBKIT_ASSERT_NOT_REACHED(); } 66 virtual void onSuccess(const WebIDBKey& key, const WebIDBKey& primaryKey, co nst WebData&, const WebVector<WebBlobInfo>&) { WEBKIT_ASSERT_NOT_REACHED(); }
66 // FIXME: Remove the following overload once callers are updated: 67 // FIXME: Remove the following overload once callers are updated:
67 virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); } 68 virtual void onBlocked() { WEBKIT_ASSERT_NOT_REACHED(); }
68 virtual void onBlocked(long long oldVersion) { WEBKIT_ASSERT_NOT_REACHED(); } 69 virtual void onBlocked(long long oldVersion) { WEBKIT_ASSERT_NOT_REACHED(); }
69 virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata) 70 virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata)
70 { 71 {
71 onUpgradeNeeded(oldVersion, database, metadata, DataLossNone); 72 onUpgradeNeeded(oldVersion, database, metadata, DataLossNone);
72 } 73 }
73 virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const We bIDBMetadata&, DataLoss dataLoss) { WEBKIT_ASSERT_NOT_REACHED(); } 74 virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const We bIDBMetadata&, DataLoss dataLoss) { WEBKIT_ASSERT_NOT_REACHED(); }
74 }; 75 };
75 76
76 } // namespace WebKit 77 } // namespace WebKit
77 78
78 #endif // WebIDBCallbacks_h 79 #endif // WebIDBCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698