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

Unified Diff: Source/core/frame/Navigator.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/Navigator.cpp
diff --git a/Source/core/frame/Navigator.cpp b/Source/core/frame/Navigator.cpp
index 31566887ea8c31ba39f7f95fdab2b32238738c1e..e1305051fc8e803af8e540e5f191595cfe2a0262 100644
--- a/Source/core/frame/Navigator.cpp
+++ b/Source/core/frame/Navigator.cpp
@@ -78,36 +78,36 @@ String Navigator::vendorSub() const
String Navigator::userAgent() const
{
// If the frame is already detached it no longer has a meaningful useragent.
- if (!m_frame || !m_frame->page())
+ if (!localFrame() || !m_frame->page())
return String();
- return m_frame->loader().userAgent(m_frame->document()->url());
+ return localFrame()->loader().userAgent(localFrame()->document()->url());
}
DOMPluginArray* Navigator::plugins() const
{
if (!m_plugins)
- m_plugins = DOMPluginArray::create(m_frame);
+ m_plugins = DOMPluginArray::create(localFrame());
return m_plugins.get();
}
DOMMimeTypeArray* Navigator::mimeTypes() const
{
if (!m_mimeTypes)
- m_mimeTypes = DOMMimeTypeArray::create(m_frame);
+ m_mimeTypes = DOMMimeTypeArray::create(localFrame());
return m_mimeTypes.get();
}
bool Navigator::cookieEnabled() const
{
- if (!m_frame)
+ if (!localFrame())
return false;
Settings* settings = m_frame->settings();
if (!settings || !settings->cookieEnabled())
return false;
- return cookiesEnabled(m_frame->document());
+ return cookiesEnabled(localFrame()->document());
}
bool Navigator::javaEnabled() const

Powered by Google App Engine
This is Rietveld 408576698