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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
46 public: | 46 public: |
47 static DOMURL* create(const String& url, ExceptionState& exceptionState) | 47 static DOMURL* create(const String& url, ExceptionState& exceptionState) |
48 { | 48 { |
49 return new DOMURL(url, blankURL(), exceptionState); | 49 return new DOMURL(url, blankURL(), exceptionState); |
50 } | 50 } |
51 static 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 new DOMURL(url, KURL(KURL(), base), exceptionState); | 53 return new DOMURL(url, KURL(KURL(), base), exceptionState); |
54 } | 54 } |
55 static DOMURL* create(const String& url, DOMURL* base, ExceptionState& excep
tionState) | |
56 { | |
57 ASSERT(base); | |
58 return new DOMURL(url, base->m_url, exceptionState); | |
59 } | |
60 | 55 |
61 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); | 56 static String createObjectURL(ExecutionContext*, Blob*, ExceptionState&); |
62 static void revokeObjectURL(ExecutionContext*, const String&); | 57 static void revokeObjectURL(ExecutionContext*, const String&); |
63 | 58 |
64 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); | 59 CORE_EXPORT static String createPublicURL(ExecutionContext*, URLRegistrable*
, const String& uuid = String()); |
65 static void revokeObjectUUID(ExecutionContext*, const String&); | 60 static void revokeObjectUUID(ExecutionContext*, const String&); |
66 | 61 |
67 KURL url() const override { return m_url; } | 62 KURL url() const override { return m_url; } |
68 void setURL(const KURL& url) override { m_url = url; } | 63 void setURL(const KURL& url) override { m_url = url; } |
69 | 64 |
70 String input() const override { return m_input; } | 65 String input() const override { return m_input; } |
71 void setInput(const String&) override; | 66 void setInput(const String&) override; |
72 | 67 |
73 DEFINE_INLINE_TRACE() { } | 68 DEFINE_INLINE_TRACE() { } |
74 | 69 |
75 private: | 70 private: |
76 DOMURL(const String& url, const KURL& base, ExceptionState&); | 71 DOMURL(const String& url, const KURL& base, ExceptionState&); |
77 | 72 |
78 KURL m_url; | 73 KURL m_url; |
79 String m_input; | 74 String m_input; |
80 }; | 75 }; |
81 | 76 |
82 } // namespace blink | 77 } // namespace blink |
83 | 78 |
84 #endif // DOMURL_h | 79 #endif // DOMURL_h |
OLD | NEW |