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

Unified Diff: Source/core/frame/DOMWindowProperty.cpp

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/DOMWindowProperty.cpp
diff --git a/Source/core/frame/DOMWindowProperty.cpp b/Source/core/frame/DOMWindowProperty.cpp
index 20b458d6718938b85f05eb6c9823ef8d36b2469b..cf552ca71cbbf5fd111ec45fa1b3ca926647c0fc 100644
--- a/Source/core/frame/DOMWindowProperty.cpp
+++ b/Source/core/frame/DOMWindowProperty.cpp
@@ -27,12 +27,13 @@
#include "config.h"
#include "core/frame/DOMWindowProperty.h"
-#include "core/frame/LocalDOMWindow.h"
+#include "core/frame/DOMWindow.h"
+#include "core/frame/Frame.h"
#include "core/frame/LocalFrame.h"
namespace blink {
-DOMWindowProperty::DOMWindowProperty(LocalFrame* frame)
+DOMWindowProperty::DOMWindowProperty(Frame* frame)
: m_frame(frame)
#if !ENABLE(OILPAN)
, m_associatedDOMWindow(nullptr)
@@ -45,9 +46,9 @@ DOMWindowProperty::DOMWindowProperty(LocalFrame* frame)
// FIXME: Need to figure out what to do with DOMWindowProperties on
// remote DOM windows.
#if ENABLE(OILPAN)
- m_frame->localDOMWindow()->registerProperty(this);
+ m_frame->domWindow()->registerProperty(this);
#else
- m_associatedDOMWindow = m_frame->localDOMWindow();
+ m_associatedDOMWindow = m_frame->domWindow();
m_associatedDOMWindow->registerProperty(this);
#endif
}
@@ -89,6 +90,13 @@ void DOMWindowProperty::willDetachGlobalObjectFromFrame()
#endif
}
+LocalFrame* DOMWindowProperty::localFrame() const
+{
+ if (m_frame && m_frame->isLocalFrame())
dcheng 2015/02/02 19:27:52 I think it's better to unconditionally toLocalFram
+ return toLocalFrame(m_frame);
+ return nullptr;
+}
+
void DOMWindowProperty::trace(Visitor* visitor)
{
visitor->trace(m_frame);

Powered by Google App Engine
This is Rietveld 408576698