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

Unified Diff: third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp

Issue 2618773004: Remove ContextClient from NavigatorGeolocation (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp b/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp
index e74f11ab4ec1e58ef52c43a935628c3e5065a634..8be08ed2852c159bca6613e47e2087020b21a3e1 100644
--- a/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.cpp
@@ -30,8 +30,8 @@
namespace blink {
-NavigatorGeolocation::NavigatorGeolocation(LocalFrame* frame)
- : ContextClient(frame) {}
+NavigatorGeolocation::NavigatorGeolocation(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
const char* NavigatorGeolocation::supplementName() {
return "NavigatorGeolocation";
@@ -41,7 +41,7 @@ NavigatorGeolocation& NavigatorGeolocation::from(Navigator& navigator) {
NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorGeolocation(navigator.frame());
+ supplement = new NavigatorGeolocation(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;
@@ -52,15 +52,14 @@ Geolocation* NavigatorGeolocation::geolocation(Navigator& navigator) {
}
Geolocation* NavigatorGeolocation::geolocation() {
- if (!m_geolocation && frame())
- m_geolocation = Geolocation::create(frame()->document());
+ if (!m_geolocation && host()->frame())
+ m_geolocation = Geolocation::create(host()->frame()->document());
return m_geolocation;
}
DEFINE_TRACE(NavigatorGeolocation) {
visitor->trace(m_geolocation);
Supplement<Navigator>::trace(visitor);
- ContextClient::trace(visitor);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/geolocation/NavigatorGeolocation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698