OLD | NEW |
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 Loading... |
34 #include "platform/weborigin/KURL.h" | 34 #include "platform/weborigin/KURL.h" |
35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class Blob; | 39 class Blob; |
40 class ExceptionState; | 40 class ExceptionState; |
41 class ExecutionContext; | 41 class ExecutionContext; |
42 class URLRegistrable; | 42 class URLRegistrable; |
43 | 43 |
44 class DOMURL final : public RefCountedWillBeGarbageCollectedFinalized<DOMURL>, p
ublic ScriptWrappable, public DOMURLUtils { | 44 class DOMURL final : public GarbageCollectedFinalized<DOMURL>, public ScriptWrap
pable, public DOMURLUtils { |
45 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
46 public: | 46 public: |
47 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, ExceptionSta
te& exceptionState) | 47 static DOMURL* create(const String& url, ExceptionState& exceptionState) |
48 { | 48 { |
49 return adoptRefWillBeNoop(new DOMURL(url, blankURL(), exceptionState)); | 49 return new DOMURL(url, blankURL(), exceptionState); |
50 } | 50 } |
51 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, const String
& base, ExceptionState& exceptionState) | 51 static DOMURL* create(const String& url, const String& base, ExceptionState&
exceptionState) |
52 { | 52 { |
53 return adoptRefWillBeNoop(new DOMURL(url, KURL(KURL(), base), exceptionS
tate)); | 53 return new DOMURL(url, KURL(KURL(), base), exceptionState); |
54 } | 54 } |
55 static PassRefPtrWillBeRawPtr<DOMURL> create(const String& url, PassRefPtrWi
llBeRawPtr<DOMURL> base, ExceptionState& exceptionState) | 55 static DOMURL* create(const String& url, DOMURL* base, ExceptionState& excep
tionState) |
56 { | 56 { |
57 ASSERT(base); | 57 ASSERT(base); |
58 return adoptRefWillBeNoop(new DOMURL(url, base->m_url, exceptionState)); | 58 return new DOMURL(url, base->m_url, exceptionState); |
59 } | 59 } |
60 | 60 |
61 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); | 61 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); |
62 static void revokeObjectURL(ExecutionContext*, const String&); | 62 static void revokeObjectURL(ExecutionContext*, const String&); |
63 | 63 |
64 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); | 64 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); |
65 static void revokeObjectUUID(ExecutionContext*, const String&); | 65 static void revokeObjectUUID(ExecutionContext*, const String&); |
66 | 66 |
67 virtual KURL url() const override { return m_url; } | 67 virtual KURL url() const override { return m_url; } |
68 virtual void setURL(const KURL& url) override { m_url = url; } | 68 virtual void setURL(const KURL& url) override { m_url = url; } |
69 | 69 |
70 virtual String input() const override { return m_input; } | 70 virtual String input() const override { return m_input; } |
71 virtual void setInput(const String&) override; | 71 virtual void setInput(const String&) override; |
72 | 72 |
73 DEFINE_INLINE_TRACE() { } | 73 DEFINE_INLINE_TRACE() { } |
74 | 74 |
75 private: | 75 private: |
76 DOMURL(const String& url, const KURL& base, ExceptionState&); | 76 DOMURL(const String& url, const KURL& base, ExceptionState&); |
77 | 77 |
78 KURL m_url; | 78 KURL m_url; |
79 String m_input; | 79 String m_input; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
83 | 83 |
84 #endif // DOMURL_h | 84 #endif // DOMURL_h |
OLD | NEW |