| OLD | NEW |
| 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 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void WebIDBKey::assignNull() | 70 void WebIDBKey::assignNull() |
| 71 { | 71 { |
| 72 m_private = IDBKey::create(); | 72 m_private = IDBKey::create(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void WebIDBKey::assign(const WebString& string) | 75 void WebIDBKey::assign(const WebString& string) |
| 76 { | 76 { |
| 77 m_private = IDBKey::create(string); | 77 m_private = IDBKey::create(string); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void WebIDBKey::assign(int32_t number) | 80 void WebIDBKey::assign(double number) |
| 81 { | 81 { |
| 82 m_private = IDBKey::create(number); | 82 m_private = IDBKey::create(number); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void WebIDBKey::assignInvalid() | 85 void WebIDBKey::assignInvalid() |
| 86 { | 86 { |
| 87 m_private = 0; | 87 m_private = 0; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void WebIDBKey::reset() | 90 void WebIDBKey::reset() |
| 91 { | 91 { |
| 92 m_private.reset(); | 92 m_private.reset(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 WebIDBKey::Type WebIDBKey::type() const | 95 WebIDBKey::Type WebIDBKey::type() const |
| 96 { | 96 { |
| 97 if (!m_private.get()) | 97 if (!m_private.get()) |
| 98 return InvalidType; | 98 return InvalidType; |
| 99 return Type(m_private->type()); | 99 return Type(m_private->type()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 WebString WebIDBKey::string() const | 102 WebString WebIDBKey::string() const |
| 103 { | 103 { |
| 104 return m_private->string(); | 104 return m_private->string(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 int32_t WebIDBKey::number() const | 107 double WebIDBKey::number() const |
| 108 { | 108 { |
| 109 return m_private->number(); | 109 return m_private->number(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 WebIDBKey::WebIDBKey(const PassRefPtr<IDBKey>& value) | 112 WebIDBKey::WebIDBKey(const PassRefPtr<IDBKey>& value) |
| 113 : m_private(value) | 113 : m_private(value) |
| 114 { | 114 { |
| 115 } | 115 } |
| 116 | 116 |
| 117 WebIDBKey& WebIDBKey::operator=(const PassRefPtr<IDBKey>& value) | 117 WebIDBKey& WebIDBKey::operator=(const PassRefPtr<IDBKey>& value) |
| 118 { | 118 { |
| 119 m_private = value; | 119 m_private = value; |
| 120 return *this; | 120 return *this; |
| 121 } | 121 } |
| 122 | 122 |
| 123 WebIDBKey::operator PassRefPtr<IDBKey>() const | 123 WebIDBKey::operator PassRefPtr<IDBKey>() const |
| 124 { | 124 { |
| 125 return m_private.get(); | 125 return m_private.get(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace WebKit | 128 } // namespace WebKit |
| 129 | 129 |
| 130 #endif // ENABLE(INDEXED_DATABASE) | 130 #endif // ENABLE(INDEXED_DATABASE) |
| OLD | NEW |