| 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 | 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef WebIDBKeyPath_h | 26 #ifndef WebIDBKeyPath_h |
| 27 #define WebIDBKeyPath_h | 27 #define WebIDBKeyPath_h |
| 28 | 28 |
| 29 #include "WebCommon.h" | 29 #include "WebCommon.h" |
| 30 #include "WebIDBTypes.h" | 30 #include "WebIDBTypes.h" |
| 31 #include "WebPrivateOwnPtr.h" | 31 #include "WebPrivateOwnPtr.h" |
| 32 #include "WebString.h" | 32 #include "WebString.h" |
| 33 #include "WebVector.h" | 33 #include "WebVector.h" |
| 34 | 34 |
| 35 namespace blink { class IDBKeyPath; } | 35 namespace blink { |
| 36 | 36 |
| 37 namespace blink { | 37 class IDBKeyPath; |
| 38 | 38 |
| 39 class WebIDBKeyPath { | 39 class WebIDBKeyPath { |
| 40 public: | 40 public: |
| 41 BLINK_EXPORT static WebIDBKeyPath create(const WebString&); | 41 BLINK_EXPORT static WebIDBKeyPath create(const WebString&); |
| 42 BLINK_EXPORT static WebIDBKeyPath create(const WebVector<WebString>&); | 42 BLINK_EXPORT static WebIDBKeyPath create(const WebVector<WebString>&); |
| 43 BLINK_EXPORT static WebIDBKeyPath createNull(); | 43 BLINK_EXPORT static WebIDBKeyPath createNull(); |
| 44 | 44 |
| 45 WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); } | 45 WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); } |
| 46 virtual ~WebIDBKeyPath() { reset(); } | 46 virtual ~WebIDBKeyPath() { reset(); } |
| 47 WebIDBKeyPath& operator=(const WebIDBKeyPath& keyPath) | 47 WebIDBKeyPath& operator=(const WebIDBKeyPath& keyPath) |
| 48 { | 48 { |
| 49 assign(keyPath); | 49 assign(keyPath); |
| 50 return *this; | 50 return *this; |
| 51 } | 51 } |
| 52 | 52 |
| 53 BLINK_EXPORT void reset(); | 53 BLINK_EXPORT void reset(); |
| 54 BLINK_EXPORT void assign(const WebIDBKeyPath&); | 54 BLINK_EXPORT void assign(const WebIDBKeyPath&); |
| 55 | 55 |
| 56 BLINK_EXPORT bool isValid() const; | 56 BLINK_EXPORT bool isValid() const; |
| 57 BLINK_EXPORT WebIDBKeyPathType keyPathType() const; | 57 BLINK_EXPORT WebIDBKeyPathType keyPathType() const; |
| 58 BLINK_EXPORT WebVector<WebString> array() const; // Only valid for ArrayType
. | 58 BLINK_EXPORT WebVector<WebString> array() const; // Only valid for ArrayType
. |
| 59 BLINK_EXPORT WebString string() const; // Only valid for StringType. | 59 BLINK_EXPORT WebString string() const; // Only valid for StringType. |
| 60 | 60 |
| 61 #if BLINK_IMPLEMENTATION | 61 #if BLINK_IMPLEMENTATION |
| 62 WebIDBKeyPath(const blink::IDBKeyPath&); | 62 WebIDBKeyPath(const IDBKeyPath&); |
| 63 WebIDBKeyPath& operator=(const blink::IDBKeyPath&); | 63 WebIDBKeyPath& operator=(const IDBKeyPath&); |
| 64 operator const blink::IDBKeyPath&() const; | 64 operator const IDBKeyPath&() const; |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 WebPrivateOwnPtr<blink::IDBKeyPath> m_private; | 68 WebPrivateOwnPtr<IDBKeyPath> m_private; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace blink | 71 } // namespace blink |
| 72 | 72 |
| 73 #endif // WebIDBKeyPath_h | 73 #endif // WebIDBKeyPath_h |
| OLD | NEW |