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

Side by Side Diff: Source/modules/indexeddb/IDBKeyRange.h

Issue 14297012: IndexedDB: Use [Default] in IDLs to reduce overloads in implementations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBIndex.idl ('k') | Source/modules/indexeddb/IDBKeyRange.idl » ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 UpperBoundClosed 47 UpperBoundClosed
48 }; 48 };
49 49
50 static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> lower, PassRefPtr<I DBKey> upper, LowerBoundType lowerType, UpperBoundType upperType) 50 static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> lower, PassRefPtr<I DBKey> upper, LowerBoundType lowerType, UpperBoundType upperType)
51 { 51 {
52 return adoptRef(new IDBKeyRange(lower, upper, lowerType, upperType)); 52 return adoptRef(new IDBKeyRange(lower, upper, lowerType, upperType));
53 } 53 }
54 static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> prpKey); 54 static PassRefPtr<IDBKeyRange> create(PassRefPtr<IDBKey> prpKey);
55 ~IDBKeyRange() { } 55 ~IDBKeyRange() { }
56 56
57 // Implement the IDBKeyRange IDL
57 PassRefPtr<IDBKey> lower() const { return m_lower; } 58 PassRefPtr<IDBKey> lower() const { return m_lower; }
58 PassRefPtr<IDBKey> upper() const { return m_upper; } 59 PassRefPtr<IDBKey> upper() const { return m_upper; }
59 60
60 ScriptValue lowerValue(ScriptExecutionContext*) const; 61 ScriptValue lowerValue(ScriptExecutionContext*) const;
61 ScriptValue upperValue(ScriptExecutionContext*) const; 62 ScriptValue upperValue(ScriptExecutionContext*) const;
62 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; } 63 bool lowerOpen() const { return m_lowerType == LowerBoundOpen; }
63 bool upperOpen() const { return m_upperType == UpperBoundOpen; } 64 bool upperOpen() const { return m_upperType == UpperBoundOpen; }
64 65
66 static PassRefPtr<IDBKeyRange> only(ScriptExecutionContext*, const ScriptVal ue& key, ExceptionCode&);
67 static PassRefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext*, const Scr iptValue& bound, bool open, ExceptionCode&);
68 static PassRefPtr<IDBKeyRange> upperBound(ScriptExecutionContext*, const Scr iptValue& bound, bool open, ExceptionCode&);
69 static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext*, const ScriptVa lue& lower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionC ode&);
70
65 static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionCode& ); 71 static PassRefPtr<IDBKeyRange> only(PassRefPtr<IDBKey> value, ExceptionCode& );
66 static PassRefPtr<IDBKeyRange> only(ScriptExecutionContext*, const ScriptVal ue& key, ExceptionCode&);
67
68 static PassRefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext* context, c onst ScriptValue& bound, ExceptionCode& ec) { return lowerBound(context, bound, false, ec); }
69 static PassRefPtr<IDBKeyRange> lowerBound(ScriptExecutionContext*, const Scr iptValue& bound, bool open, ExceptionCode&);
70
71 static PassRefPtr<IDBKeyRange> upperBound(ScriptExecutionContext* context, c onst ScriptValue& bound, ExceptionCode& ec) { return upperBound(context, bound, false, ec); }
72 static PassRefPtr<IDBKeyRange> upperBound(ScriptExecutionContext*, const Scr iptValue& bound, bool open, ExceptionCode&);
73
74 static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const ScriptValue& lower, const ScriptValue& upper, ExceptionCode& ec) { return bound( context, lower, upper, false, false, ec); }
75 static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext* context, const ScriptValue& lower, const ScriptValue& upper, bool lowerOpen, ExceptionCode& ec) { return bound(context, lower, upper, lowerOpen, false, ec); }
76 static PassRefPtr<IDBKeyRange> bound(ScriptExecutionContext*, const ScriptVa lue& lower, const ScriptValue& upper, bool lowerOpen, bool upperOpen, ExceptionC ode&);
77 72
78 bool isOnlyKey() const; 73 bool isOnlyKey() const;
79 74
80 private: 75 private:
81 IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundTy pe lowerType, UpperBoundType upperType); 76 IDBKeyRange(PassRefPtr<IDBKey> lower, PassRefPtr<IDBKey> upper, LowerBoundTy pe lowerType, UpperBoundType upperType);
82 77
83 RefPtr<IDBKey> m_lower; 78 RefPtr<IDBKey> m_lower;
84 RefPtr<IDBKey> m_upper; 79 RefPtr<IDBKey> m_upper;
85 LowerBoundType m_lowerType; 80 LowerBoundType m_lowerType;
86 UpperBoundType m_upperType; 81 UpperBoundType m_upperType;
87 }; 82 };
88 83
89 } // namespace WebCore 84 } // namespace WebCore
90 85
91 #endif // IDBKeyRange_h 86 #endif // IDBKeyRange_h
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBIndex.idl ('k') | Source/modules/indexeddb/IDBKeyRange.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698