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

Unified Diff: Source/modules/geolocation/NavigatorGeolocation.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/modules/geolocation/NavigatorGeolocation.cpp
diff --git a/Source/modules/geolocation/NavigatorGeolocation.cpp b/Source/modules/geolocation/NavigatorGeolocation.cpp
index cd8f2a41e4909c0de51fa337e59f9b1dec3356ef..97ffa7222352ef383fbf05e55f600d1a2f5840be 100644
--- a/Source/modules/geolocation/NavigatorGeolocation.cpp
+++ b/Source/modules/geolocation/NavigatorGeolocation.cpp
@@ -46,7 +46,7 @@ NavigatorGeolocation& NavigatorGeolocation::from(Navigator& navigator)
{
NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(WillBeHeapSupplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorGeolocation(navigator.frame());
+ supplement = new NavigatorGeolocation(navigator.localFrame());
provideTo(navigator, supplementName(), adoptPtrWillBeNoop(supplement));
}
return *supplement;
@@ -59,8 +59,8 @@ Geolocation* NavigatorGeolocation::geolocation(Navigator& navigator)
Geolocation* NavigatorGeolocation::geolocation()
{
- if (!m_geolocation && frame())
- m_geolocation = Geolocation::create(frame()->document());
+ if (!m_geolocation && localFrame())
+ m_geolocation = Geolocation::create(localFrame()->document());
return m_geolocation.get();
}

Powered by Google App Engine
This is Rietveld 408576698