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

Side by Side Diff: Source/core/dom/DOMURLSearchParams.h

Issue 143313002: Implement URLSearchParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 4 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
« no previous file with comments | « Source/core/dom/DOMURL.cpp ('k') | Source/core/dom/DOMURLSearchParams.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DOMURLSearchParams_h
6 #define DOMURLSearchParams_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "platform/heap/Handle.h"
10 #include "wtf/Forward.h"
11 #include "wtf/text/WTFString.h"
12 #include <utility>
13
14 namespace blink {
15
16 class DOMURLUtils;
17 class ExceptionState;
18
19 class DOMURLSearchParams FINAL : public GarbageCollectedFinalized<DOMURLSearchPa rams>, public ScriptWrappable {
20 public:
21 static DOMURLSearchParams* create(const String& queryString = String(), DOMU RLUtils* urlObject = 0)
22 {
23 return new DOMURLSearchParams(queryString, urlObject);
24 }
25
26 static DOMURLSearchParams* create(DOMURLSearchParams* searchParams, DOMURLUt ils* urlObject = 0)
27 {
28 return new DOMURLSearchParams(searchParams, urlObject);
29 }
30
31 virtual ~DOMURLSearchParams();
32
33 // URLSearchParams interface methods
34 String toString() const;
35 void append(const String& name, const String& value);
36 void deleteAllWithName(const String&);
37 String get(const String&) const;
38 Vector<String> getAll(const String&) const;
39 bool has(const String&) const;
40 void set(const String& name, const String& value);
41
42 void setInput(const String&);
43
44 void dropURLObject(DOMURLUtils*);
45 void addURLObject(DOMURLUtils*);
46 #if ENABLE(ASSERT)
47 bool hasURLObject(DOMURLUtils*) const;
48 #endif
49
50 void trace(Visitor*);
51
52 private:
53 DOMURLSearchParams(const String&, DOMURLUtils*);
54 DOMURLSearchParams(DOMURLSearchParams*, DOMURLUtils*);
55
56 void runUpdateSteps();
57
58 Vector<std::pair<String, String> > m_params;
59 WillBeHeapVector<RawPtrWillBeMember<DOMURLUtils> > m_urlObjects;
60 bool m_isUpdating;
61 };
62
63 } // namespace blink
64
65 #endif // DOMURLSearchParams_h
OLDNEW
« no previous file with comments | « Source/core/dom/DOMURL.cpp ('k') | Source/core/dom/DOMURLSearchParams.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698