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

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

Issue 1092073007: Oilpan: have URL object on the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « no previous file | Source/core/dom/URL.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) 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 "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
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/URL.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698