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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h

Issue 1963293002: Replacing Indexed DB Chromium IPC with Mojo Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactoring after Passing URLRequestContextGetter. Created 4 years, 4 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
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the
14 * distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC.
20 * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef WebIDBCallbacksImpl_h
30 #define WebIDBCallbacksImpl_h
31
32 #include "public/platform/modules/indexeddb/WebIDBCallbacks.h"
33 #include "wtf/PassRefPtr.h"
34 #include "wtf/RefPtr.h"
35 #include <memory>
36
37 namespace blink {
38
39 class IDBRequest;
40 class WebIDBCursor;
41 class WebIDBDatabase;
42 class WebIDBDatabaseError;
43 class WebIDBKey;
44 struct WebIDBMetadata;
45 struct WebIDBValue;
46
47 class WebIDBCallbacksImpl final : public WebIDBCallbacks {
48 USING_FAST_MALLOC(WebIDBCallbacksImpl);
49 public:
50 static std::unique_ptr<WebIDBCallbacksImpl> create(IDBRequest*);
51
52 ~WebIDBCallbacksImpl() override;
53
54 // Pointers transfer ownership.
55 void onError(const WebIDBDatabaseError&) override;
56 void onSuccess(const WebVector<WebString>&) override;
57 void onSuccess(WebIDBCursor*, const WebIDBKey&, const WebIDBKey& primaryKey, const WebIDBValue&) override;
58 void onSuccess(WebIDBDatabase*, const WebIDBMetadata&) override;
59 void onSuccess(const WebIDBKey&) override;
60 void onSuccess(const WebIDBValue&) override;
61 void onSuccess(const WebVector<WebIDBValue>&) override;
62 void onSuccess(long long) override;
63 void onSuccess() override;
64 void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebIDBVa lue&) override;
65 void onBlocked(long long oldVersion) override;
66 void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMeta data&, unsigned short dataLoss, WebString dataLossMessage) override;
67
68 private:
69 explicit WebIDBCallbacksImpl(IDBRequest*);
70
71 Persistent<IDBRequest> m_request;
72 };
73
74 } // namespace blink
75
76 #endif // WebIDBCallbacksImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698