OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
43 | 43 |
44 public: | 44 public: |
45 static IDBCursorWithValue* create(std::unique_ptr<WebIDBCursor>, | 45 static IDBCursorWithValue* create(std::unique_ptr<WebIDBCursor>, |
46 WebIDBCursorDirection, | 46 WebIDBCursorDirection, |
47 IDBRequest*, | 47 IDBRequest*, |
48 IDBAny* source, | 48 IDBAny* source, |
49 IDBTransaction*); | 49 IDBTransaction*); |
50 ~IDBCursorWithValue() override; | 50 ~IDBCursorWithValue() override; |
51 | 51 |
52 // The value attribute defined in the IDL is simply implemented in IDBCursor (
but not exposed via | 52 // The value attribute defined in the IDL is simply implemented in IDBCursor |
53 // its IDL). This is to make the implementation more simple while matching wha
t the spec says. | 53 // (but not exposed via its IDL). This is to make the implementation more |
| 54 // simple while matching what the spec says. |
54 | 55 |
55 bool isKeyCursor() const override { return false; } | 56 bool isKeyCursor() const override { return false; } |
56 bool isCursorWithValue() const override { return true; } | 57 bool isCursorWithValue() const override { return true; } |
57 | 58 |
58 private: | 59 private: |
59 IDBCursorWithValue(std::unique_ptr<WebIDBCursor>, | 60 IDBCursorWithValue(std::unique_ptr<WebIDBCursor>, |
60 WebIDBCursorDirection, | 61 WebIDBCursorDirection, |
61 IDBRequest*, | 62 IDBRequest*, |
62 IDBAny* source, | 63 IDBAny* source, |
63 IDBTransaction*); | 64 IDBTransaction*); |
64 }; | 65 }; |
65 | 66 |
66 DEFINE_TYPE_CASTS(IDBCursorWithValue, | 67 DEFINE_TYPE_CASTS(IDBCursorWithValue, |
67 IDBCursor, | 68 IDBCursor, |
68 cursor, | 69 cursor, |
69 cursor->isCursorWithValue(), | 70 cursor->isCursorWithValue(), |
70 cursor.isCursorWithValue()); | 71 cursor.isCursorWithValue()); |
71 | 72 |
72 } // namespace blink | 73 } // namespace blink |
73 | 74 |
74 #endif // IDBCursorWithValue_h | 75 #endif // IDBCursorWithValue_h |
OLD | NEW |