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

Unified Diff: Source/modules/geolocation/GeofencingController.cpp

Issue 393533002: Pass through the geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@geofencing2
Patch Set: Created 6 years, 5 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/GeofencingController.cpp
diff --git a/Source/modules/geolocation/GeofencingController.cpp b/Source/modules/geolocation/GeofencingController.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..496e782cddf4bdf65dda2fccb44586e4ca38189b
--- /dev/null
+++ b/Source/modules/geolocation/GeofencingController.cpp
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/geolocation/GeofencingController.h"
+
+#include "public/platform/WebGeofencingClient.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace WebCore {
+
+GeofencingController::GeofencingController(blink::WebGeofencingClient* client)
+ : m_client(client)
+{
+}
+
+PassOwnPtrWillBeRawPtr<GeofencingController> GeofencingController::create(blink::WebGeofencingClient* client)
+{
+ return adoptPtrWillBeNoop(new GeofencingController(client));
+}
+
+blink::WebGeofencingClient* GeofencingController::clientFrom(LocalFrame* frame)
+{
+ if (GeofencingController* controller = GeofencingController::from(frame))
+ return controller->client();
+ return 0;
+}
+
+const char* GeofencingController::supplementName()
+{
+ return "GeofencingController";
+}
+
+void provideGeofencingControllerTo(LocalFrame& frame, blink::WebGeofencingClient* client)
+{
+ GeofencingController::provideTo(frame, GeofencingController::supplementName(), GeofencingController::create(client));
+}
+
+} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698