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

Unified Diff: content/child/geofencing/web_geofencing_provider_impl.h

Issue 476293002: Pass through geofencing API calls to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and add region_id sanity check Created 6 years, 2 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: content/child/geofencing/web_geofencing_provider_impl.h
diff --git a/content/child/geofencing/web_geofencing_provider_impl.h b/content/child/geofencing/web_geofencing_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1dd7445d0dd4c47478734869529529ef4dfadf3
--- /dev/null
+++ b/content/child/geofencing/web_geofencing_provider_impl.h
@@ -0,0 +1,41 @@
+// 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 CONTENT_CHILD_GEOFENCING_WEB_GEOFENCING_PROVIDER_IMPL_H_
+#define CONTENT_CHILD_GEOFENCING_WEB_GEOFENCING_PROVIDER_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "third_party/WebKit/public/platform/WebGeofencingProvider.h"
+
+namespace content {
+class GeofencingDispatcher;
+class ThreadSafeSender;
+
+class WebGeofencingProviderImpl
+ : NON_EXPORTED_BASE(public blink::WebGeofencingProvider) {
+ public:
+ explicit WebGeofencingProviderImpl(ThreadSafeSender* thread_safe_sender);
+ virtual ~WebGeofencingProviderImpl();
+
+ private:
+ // WebGeofencingProvider implementation.
+ virtual void registerRegion(const blink::WebString& regionId,
+ const blink::WebCircularGeofencingRegion& region,
+ blink::WebGeofencingCallbacks* callbacks);
+ virtual void unregisterRegion(const blink::WebString& regionId,
+ blink::WebGeofencingCallbacks* callbacks);
+ virtual void getRegisteredRegions(
+ blink::WebGeofencingRegionsCallbacks* callbacks);
+
+ GeofencingDispatcher* GetDispatcher();
+
+ scoped_refptr<ThreadSafeSender> thread_safe_sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebGeofencingProviderImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_GEOFENCING_WEB_GEOFENCING_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698