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

Side by Side Diff: third_party/WebKit/Source/core/frame/Location.h

Issue 2629333002: Remove DOMWindowProperty (Closed)
Patch Set: temp Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef Location_h 29 #ifndef Location_h
30 #define Location_h 30 #define Location_h
31 31
32 #include "bindings/core/v8/ScriptValue.h" 32 #include "bindings/core/v8/ScriptValue.h"
33 #include "bindings/core/v8/ScriptWrappable.h" 33 #include "bindings/core/v8/ScriptWrappable.h"
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/dom/DOMStringList.h" 35 #include "core/dom/DOMStringList.h"
36 #include "core/frame/DOMWindowProperty.h"
37 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
38 37
39 namespace blink { 38 namespace blink {
40 39
41 class LocalDOMWindow; 40 class LocalDOMWindow;
42 class ExceptionState; 41 class ExceptionState;
43 class Frame; 42 class Frame;
44 class KURL; 43 class KURL;
45 44
46 // This class corresponds to the JS Location API, which is the only DOM API 45 // This class corresponds to the JS Location API, which is the only DOM API
47 // besides Window that is operable in a RemoteFrame. Rather than making 46 // besides Window that is operable in a RemoteFrame. Location needs to be
48 // DOMWindowProperty support RemoteFrames and generating a lot code churn, 47 // manually updated in DOMWindow::reset() to ensure it doesn't retain a stale
49 // Location is implemented as a one-off with some custom lifetime management 48 // Frame pointer.
50 // code. Namely, it needs a manual call to reset() from DOMWindow::reset() to
51 // ensure it doesn't retain a stale Frame pointer.
52 class CORE_EXPORT Location final : public GarbageCollected<Location>, 49 class CORE_EXPORT Location final : public GarbageCollected<Location>,
53 public ScriptWrappable { 50 public ScriptWrappable {
54 DEFINE_WRAPPERTYPEINFO(); 51 DEFINE_WRAPPERTYPEINFO();
55 52
56 public: 53 public:
57 static Location* create(Frame* frame) { return new Location(frame); } 54 static Location* create(Frame* frame) { return new Location(frame); }
58 55
59 Frame* frame() const { return m_frame.get(); } 56 Frame* frame() const { return m_frame.get(); }
60 void reset() { m_frame = nullptr; } 57 void reset() { m_frame = nullptr; }
61 58
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 SetLocationPolicy = SetLocationPolicy::Normal); 130 SetLocationPolicy = SetLocationPolicy::Normal);
134 131
135 const KURL& url() const; 132 const KURL& url() const;
136 133
137 Member<Frame> m_frame; 134 Member<Frame> m_frame;
138 }; 135 };
139 136
140 } // namespace blink 137 } // namespace blink
141 138
142 #endif // Location_h 139 #endif // Location_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698