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

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

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.h
diff --git a/Source/modules/geolocation/GeofencingController.h b/Source/modules/geolocation/GeofencingController.h
new file mode 100644
index 0000000000000000000000000000000000000000..d08a55a19eb9b996e10d8fcd9ed2aecf1d8f6144
--- /dev/null
+++ b/Source/modules/geolocation/GeofencingController.h
@@ -0,0 +1,44 @@
+// 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.
+
+#ifndef GeofencingController_h
+#define GeofencingController_h
+
+#include "core/frame/LocalFrame.h"
+#include "platform/Supplementable.h"
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/PassOwnPtr.h"
+
+namespace blink {
+class WebGeofencingClient;
+} // namespace blink
+
+namespace WebCore {
+
+class GeofencingController FINAL : public NoBaseWillBeGarbageCollected<GeofencingController>, public WillBeHeapSupplement<LocalFrame> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(GeofencingController);
+ WTF_MAKE_NONCOPYABLE(GeofencingController);
+
+public:
+ static PassOwnPtrWillBeRawPtr<GeofencingController> create(blink::WebGeofencingClient*);
+ static const char* supplementName();
+ static GeofencingController* from(LocalFrame* frame) { return static_cast<GeofencingController*>(WillBeHeapSupplement<LocalFrame>::from(frame, supplementName())); }
+ static blink::WebGeofencingClient* clientFrom(LocalFrame*);
+
+ blink::WebGeofencingClient* client() const { return m_client; }
+
+ virtual void trace(Visitor* visitor) OVERRIDE { WillBeHeapSupplement<LocalFrame>::trace(visitor); }
+
+private:
+ explicit GeofencingController(blink::WebGeofencingClient*);
+
+ blink::WebGeofencingClient* m_client;
+};
+
+void provideGeofencingControllerTo(LocalFrame&, blink::WebGeofencingClient*);
+
+} // namespace WebCore
+
+#endif // GeofencingController_h

Powered by Google App Engine
This is Rietveld 408576698