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

Unified Diff: Source/core/frame/DOMWindow.h

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/DOMWindow.h
diff --git a/Source/core/frame/DOMWindow.h b/Source/core/frame/DOMWindow.h
index b14d7822b705b55fbc9b3202f1ad8bbb6d84c372..9972a4e56b687c8929cec5f2bc117cd90181e1ab 100644
--- a/Source/core/frame/DOMWindow.h
+++ b/Source/core/frame/DOMWindow.h
@@ -21,6 +21,7 @@ class CSSStyleDeclaration;
class Console;
class DOMSelection;
class DOMWindowCSS;
+class DOMWindowProperty;
class Document;
class Element;
class Frame;
@@ -43,10 +44,13 @@ class DOMWindow : public EventTargetWithInlineData, public RefCountedWillBeNoBas
DEFINE_WRAPPERTYPEINFO();
REFCOUNTED_EVENT_TARGET(DOMWindow);
public:
+ virtual ~DOMWindow();
+
// RefCountedWillBeGarbageCollectedFinalized overrides:
void trace(Visitor* visitor) override
{
dcheng 2015/02/02 19:27:52 +haraken, is there a threshhold that it's preferab
EventTargetWithInlineData::trace(visitor);
+ visitor->trace(m_location);
}
virtual bool isLocalDOMWindow() const { return false; }
@@ -65,8 +69,7 @@ public:
virtual BarProp* toolbar() const = 0;
virtual Navigator* navigator() const = 0;
Navigator* clientInformation() const { return navigator(); }
- // FIXME: Temporary, until window.location is implemented for remote frames.
- virtual Location* location() const = 0;
+ Location* location() const;
virtual bool offscreenBuffering() const = 0;
@@ -190,6 +193,13 @@ public:
// See https://bugs.webkit.org/show_bug.cgi?id=62054
bool isCurrentlyDisplayedInFrame() const;
+ virtual void reset();
+
+ void registerProperty(DOMWindowProperty*);
+ void unregisterProperty(DOMWindowProperty*);
+ void willDestroyDocumentInFrame();
+ void willDetachDocumentFromFrame();
+
DEFINE_ATTRIBUTE_EVENT_LISTENER(animationend);
DEFINE_ATTRIBUTE_EVENT_LISTENER(animationiteration);
DEFINE_ATTRIBUTE_EVENT_LISTENER(animationstart);
@@ -207,6 +217,11 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove);
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
+
+private:
+
dcheng 2015/02/02 19:27:52 Nit: remove blank line.
+ WillBeHeapHashSet<RawPtrWillBeWeakMember<DOMWindowProperty>> m_properties;
+ mutable RefPtrWillBeMember<Location> m_location;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698