OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebGeolocationService_h | 31 #ifndef WebGeolocationService_h |
32 #define WebGeolocationService_h | 32 #define WebGeolocationService_h |
33 | 33 |
34 #include "WebGeolocationServiceBridge.h" | |
35 | |
36 namespace WebKit { | 34 namespace WebKit { |
37 | 35 |
| 36 class WebGeolocationServiceBridge; |
38 class WebString; | 37 class WebString; |
39 class WebURL; | 38 class WebURL; |
40 | 39 |
41 // Provides an embedder API called by WebKit. | 40 // Provides an embedder API called by WebKit. |
42 class WebGeolocationService { | 41 class WebGeolocationService { |
43 public: | 42 public: |
44 virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) { } | 43 virtual void requestPermissionForFrame(int bridgeId, const WebURL& url) { } |
45 virtual void cancelPermissionRequestForFrame(int bridgeId, const WebURL&) {
} | 44 virtual void cancelPermissionRequestForFrame(int bridgeId, const WebURL&) {
} |
46 virtual void startUpdating(int bridgeId, const WebURL& url, bool enableHighA
ccuracy) { } | 45 virtual void startUpdating(int bridgeId, const WebURL& url, bool enableHighA
ccuracy) { } |
47 virtual void stopUpdating(int bridgeId) { } | 46 virtual void stopUpdating(int bridgeId) { } |
48 virtual void suspend(int bridgeId) { } | 47 virtual void suspend(int bridgeId) { } |
49 virtual void resume(int bridgeId) { } | 48 virtual void resume(int bridgeId) { } |
50 | 49 |
51 // Attaches the WebGeolocationServiceBridge to the embedder and returns its | 50 // Attaches the WebGeolocationServiceBridge to the embedder and returns its |
52 // id, which should be used on subsequent calls for the methods above. | 51 // id, which should be used on subsequent calls for the methods above. |
| 52 // An ID of zero indicates the attach failed. |
53 virtual int attachBridge(WebGeolocationServiceBridge*) { return 0; } | 53 virtual int attachBridge(WebGeolocationServiceBridge*) { return 0; } |
54 | 54 |
55 // Detaches the WebGeolocationServiceBridge from the embedder. | 55 // Detaches the WebGeolocationServiceBridge from the embedder. |
56 virtual void detachBridge(int bridgeId) { } | 56 virtual void detachBridge(int bridgeId) { } |
| 57 |
| 58 protected: |
| 59 virtual ~WebGeolocationService() {} |
57 }; | 60 }; |
58 | 61 |
59 } // namespace WebKit | 62 } // namespace WebKit |
60 | 63 |
61 #endif // WebGeolocationService_h | 64 #endif // WebGeolocationService_h |
OLD | NEW |