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

Side by Side Diff: Source/core/dom/DOMURL.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/core.gypi ('k') | Source/core/dom/DOMURL.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Motorola Mobility Inc. 3 * Copyright (C) 2012 Motorola Mobility Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class Blob; 38 class Blob;
39 class ExceptionState; 39 class ExceptionState;
40 class ExecutionContext; 40 class ExecutionContext;
41 class URLRegistrable; 41 class URLRegistrable;
42 42
43 class DOMURL FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOMURL>, p ublic ScriptWrappable, public DOMURLUtils { 43 class DOMURL FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOMURL>, p ublic ScriptWrappable, public DOMURLUtils {
44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMURL);
44 public: 45 public:
45 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, ExceptionSta te& exceptionState) 46 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, ExceptionSta te& exceptionState)
46 { 47 {
47 return adoptRefWillBeNoop(new DOMURL(url, blankURL(), exceptionState)); 48 return adoptRefWillBeNoop(new DOMURL(url, blankURL(), exceptionState));
48 } 49 }
49 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, const String & base, ExceptionState& exceptionState) 50 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, const String & base, ExceptionState& exceptionState)
50 { 51 {
51 return adoptRefWillBeNoop(new DOMURL(url, KURL(KURL(), base), exceptionS tate)); 52 return adoptRefWillBeNoop(new DOMURL(url, KURL(KURL(), base), exceptionS tate));
52 } 53 }
53 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, PassRefPtrWi llBeRawPtr<DOMURL> base, ExceptionState& exceptionState) 54 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, PassRefPtrWi llBeRawPtr<DOMURL> base, ExceptionState& exceptionState)
54 { 55 {
55 ASSERT(base); 56 ASSERT(base);
56 return adoptRefWillBeNoop(new DOMURL(url, base->m_url, exceptionState)); 57 return adoptRefWillBeNoop(new DOMURL(url, base->m_url, exceptionState));
57 } 58 }
58 59
59 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); 60 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&);
60 static void revokeObjectURL(ExecutionContext*, const String&); 61 static void revokeObjectURL(ExecutionContext*, const String&);
61 62
62 static String createPublicURL(ExecutionContext*, URLRegistrable*, const Stri ng& uuid = String()); 63 static String createPublicURL(ExecutionContext*, URLRegistrable*, const Stri ng& uuid = String());
63 static void revokeObjectUUID(ExecutionContext*, const String&); 64 static void revokeObjectUUID(ExecutionContext*, const String&);
64 65
65 virtual KURL url() const OVERRIDE { return m_url; } 66 virtual KURL url() const OVERRIDE { return m_url; }
66 virtual void setURL(const KURL& url) OVERRIDE { m_url = url; } 67 virtual void setURL(const KURL& url) OVERRIDE { m_url = url; }
67 68
68 virtual String input() const OVERRIDE { return m_input; } 69 virtual String input() const OVERRIDE { return m_input; }
69 virtual void setInput(const String&) OVERRIDE; 70 virtual void setInput(const String&) OVERRIDE;
70 71
71 void trace(Visitor*) { } 72 virtual void trace(Visitor*) OVERRIDE;
72 73
73 private: 74 private:
74 DOMURL(const String& url, const KURL& base, ExceptionState&); 75 DOMURL(const String& url, const KURL& base, ExceptionState&);
75 76
76 KURL m_url; 77 KURL m_url;
77 String m_input; 78 String m_input;
78 }; 79 };
79 80
80 } // namespace blink 81 } // namespace blink
81 82
82 #endif // DOMURL_h 83 #endif // DOMURL_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/DOMURL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698