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

Side by Side Diff: WebKit/chromium/public/WebIDBKey.h

Issue 5800002: Merge 73697 - 2010-12-10 Hans Wennborg <hans@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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
« no previous file with comments | « WebKit/chromium/ChangeLog ('k') | WebKit/chromium/src/WebIDBKey.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30 matching lines...) Expand all
41 public: 41 public:
42 // Please use one of the factory methods. This is public only to allow WebVe ctor. 42 // Please use one of the factory methods. This is public only to allow WebVe ctor.
43 WebIDBKey() { } 43 WebIDBKey() { }
44 ~WebIDBKey() { reset(); } 44 ~WebIDBKey() { reset(); }
45 45
46 WEBKIT_API static WebIDBKey createNull(); 46 WEBKIT_API static WebIDBKey createNull();
47 WEBKIT_API static WebIDBKey createInvalid(); 47 WEBKIT_API static WebIDBKey createInvalid();
48 WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScr iptValue&, const WebIDBKeyPath&); 48 WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScr iptValue&, const WebIDBKeyPath&);
49 49
50 WebIDBKey(const WebString& string) { assign(string); } 50 WebIDBKey(const WebString& string) { assign(string); }
51 WebIDBKey(int32_t number) { assign(number); } 51 WebIDBKey(double number) { assign(number); }
52 WebIDBKey(const WebIDBKey& e) { assign(e); } 52 WebIDBKey(const WebIDBKey& e) { assign(e); }
53 WebIDBKey& operator=(const WebIDBKey& e) 53 WebIDBKey& operator=(const WebIDBKey& e)
54 { 54 {
55 assign(e); 55 assign(e);
56 return *this; 56 return *this;
57 } 57 }
58 58
59 WEBKIT_API void assign(const WebIDBKey&); 59 WEBKIT_API void assign(const WebIDBKey&);
60 WEBKIT_API void assignNull(); 60 WEBKIT_API void assignNull();
61 WEBKIT_API void assign(const WebString&); 61 WEBKIT_API void assign(const WebString&);
62 WEBKIT_API void assign(int32_t); 62 WEBKIT_API void assign(double);
63 WEBKIT_API void assignInvalid(); 63 WEBKIT_API void assignInvalid();
64 WEBKIT_API void reset(); 64 WEBKIT_API void reset();
65 65
66 enum Type { 66 enum Type {
67 NullType = 0, 67 NullType = 0,
68 StringType, 68 StringType,
69 NumberType, 69 NumberType,
70 // Types not in WebCore::IDBKey: 70 // Types not in WebCore::IDBKey:
71 InvalidType 71 InvalidType
72 }; 72 };
73 73
74 WEBKIT_API Type type() const; 74 WEBKIT_API Type type() const;
75 WEBKIT_API WebString string() const; // Only valid for StringType. 75 WEBKIT_API WebString string() const; // Only valid for StringType.
76 WEBKIT_API int32_t number() const; // Only valid for numberType. 76 WEBKIT_API double number() const; // Only valid for numberType.
77 77
78 #if WEBKIT_IMPLEMENTATION 78 #if WEBKIT_IMPLEMENTATION
79 WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&); 79 WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&);
80 WebIDBKey& operator=(const WTF::PassRefPtr<WebCore::IDBKey>&); 80 WebIDBKey& operator=(const WTF::PassRefPtr<WebCore::IDBKey>&);
81 operator WTF::PassRefPtr<WebCore::IDBKey>() const; 81 operator WTF::PassRefPtr<WebCore::IDBKey>() const;
82 #endif 82 #endif
83 83
84 private: 84 private:
85 WebPrivatePtr<WebCore::IDBKey> m_private; 85 WebPrivatePtr<WebCore::IDBKey> m_private;
86 }; 86 };
87 87
88 } // namespace WebKit 88 } // namespace WebKit
89 89
90 #endif // WebIDBKey_h 90 #endif // WebIDBKey_h
OLDNEW
« no previous file with comments | « WebKit/chromium/ChangeLog ('k') | WebKit/chromium/src/WebIDBKey.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698