Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WebGeofencingRegion_h | |
| 6 #define WebGeofencingRegion_h | |
| 7 | |
| 8 #include "WebCommon.h" | |
| 9 #include "WebPrivatePtr.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class WebGeofencingRegionPrivate; | |
| 14 class WebString; | |
| 15 | |
| 16 class WebGeofencingRegion { | |
| 17 public: | |
| 18 virtual ~WebGeofencingRegion() { reset(); } | |
| 19 | |
| 20 WebGeofencingRegion() { } | |
| 21 WebGeofencingRegion(const WebGeofencingRegion& other) { assign(other); } | |
| 22 WebGeofencingRegion& operator=(const WebGeofencingRegion& other) | |
| 23 { | |
| 24 assign(other); | |
| 25 return *this; | |
| 26 } | |
| 27 | |
| 28 bool isNull() const { return m_private.isNull(); } | |
| 29 | |
| 30 BLINK_PLATFORM_EXPORT WebString id() const; | |
| 31 | |
| 32 template<typename T> T to() | |
| 33 { | |
| 34 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
| |
| 35 res.WebGeofencingRegion::assign(*this); | |
| 36 return res; | |
| 37 } | |
| 38 | |
| 39 template<typename T> const T toConst() const | |
| 40 { | |
| 41 T res; | |
| 42 res.WebGeofencingRegion::assign(*this); | |
| 43 return res; | |
| 44 } | |
| 45 | |
| 46 enum RegionType { | |
| 47 CircularRegionType | |
| 48 }; | |
| 49 BLINK_PLATFORM_EXPORT RegionType regionType() const; | |
| 50 | |
| 51 protected: | |
| 52 BLINK_PLATFORM_EXPORT void assign(const WebGeofencingRegion& other); | |
| 53 BLINK_PLATFORM_EXPORT void reset(); | |
| 54 | |
| 55 WebPrivatePtr<WebGeofencingRegionPrivate> m_private; | |
| 56 }; | |
| 57 | |
| 58 } // namespace blink | |
| 59 | |
| 60 #endif // WebGeofencingRegion_h | |
| OLD | NEW |