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

Unified Diff: public/platform/WebGeofencingRegion.h

Issue 464073002: Pass through geofencing API calls to the content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 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: public/platform/WebGeofencingRegion.h
diff --git a/public/platform/WebGeofencingRegion.h b/public/platform/WebGeofencingRegion.h
new file mode 100644
index 0000000000000000000000000000000000000000..af6fbdf3001eec96b9b18a15fcf7b41193b6b3f7
--- /dev/null
+++ b/public/platform/WebGeofencingRegion.h
@@ -0,0 +1,60 @@
+// 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 WebGeofencingRegion_h
+#define WebGeofencingRegion_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace blink {
+
+class WebGeofencingRegionPrivate;
+class WebString;
+
+class WebGeofencingRegion {
+public:
+ virtual ~WebGeofencingRegion() { reset(); }
+
+ WebGeofencingRegion() { }
+ WebGeofencingRegion(const WebGeofencingRegion& other) { assign(other); }
+ WebGeofencingRegion& operator=(const WebGeofencingRegion& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ bool isNull() const { return m_private.isNull(); }
+
+ BLINK_PLATFORM_EXPORT WebString id() const;
+
+ template<typename T> T to()
+ {
+ T res;
abarth-chromium 2014/08/23 05:43:34 s/res/result/ Please use complete words in variab
abarth-chromium 2014/08/23 05:43:34 s/res/result/ Please use complete words in variab
Marijn Kruisselbrink 2014/08/25 22:25:25 Done, that's what I get for copying existing blink
+ res.WebGeofencingRegion::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConst() const
+ {
+ T res;
+ res.WebGeofencingRegion::assign(*this);
+ return res;
+ }
+
+ enum RegionType {
+ CircularRegionType
+ };
+ BLINK_PLATFORM_EXPORT RegionType regionType() const;
+
+protected:
+ BLINK_PLATFORM_EXPORT void assign(const WebGeofencingRegion& other);
+ BLINK_PLATFORM_EXPORT void reset();
+
+ WebPrivatePtr<WebGeofencingRegionPrivate> m_private;
+};
+
+} // namespace blink
+
+#endif // WebGeofencingRegion_h
« public/platform/WebGeofencingProvider.h ('K') | « public/platform/WebGeofencingProvider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698