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 17 matching lines...) Expand all Loading... |
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 WebGeolocationClientMock_h | 31 #ifndef WebGeolocationClientMock_h |
32 #define WebGeolocationClientMock_h | 32 #define WebGeolocationClientMock_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
35 #include "../platform/WebPrivateOwnPtr.h" | 35 #include "../platform/WebPrivateOwnPtr.h" |
36 #include "WebGeolocationClient.h" | 36 #include "WebGeolocationClient.h" |
37 | 37 |
38 namespace WebCore { | 38 namespace blink { |
39 class GeolocationClientMock; | 39 class GeolocationClientMock; |
40 } | |
41 | |
42 namespace blink { | |
43 class WebGeolocationPosition; | 40 class WebGeolocationPosition; |
44 class WebString; | 41 class WebString; |
45 | 42 |
46 class WebGeolocationClientMock : public WebGeolocationClient { | 43 class WebGeolocationClientMock : public WebGeolocationClient { |
47 public: | 44 public: |
48 BLINK_EXPORT static WebGeolocationClientMock* create(); | 45 BLINK_EXPORT static WebGeolocationClientMock* create(); |
49 ~WebGeolocationClientMock() { reset(); } | 46 ~WebGeolocationClientMock() { reset(); } |
50 | 47 |
51 BLINK_EXPORT void setPosition(double latitude, double longitude, double accu
racy); | 48 BLINK_EXPORT void setPosition(double latitude, double longitude, double accu
racy); |
52 BLINK_EXPORT void setPositionUnavailableError(const WebString& message); | 49 BLINK_EXPORT void setPositionUnavailableError(const WebString& message); |
(...skipping 10 matching lines...) Expand all Loading... |
63 | 60 |
64 virtual void requestPermission(const WebGeolocationPermissionRequest&); | 61 virtual void requestPermission(const WebGeolocationPermissionRequest&); |
65 virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&)
; | 62 virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&)
; |
66 | 63 |
67 virtual bool lastPosition(WebGeolocationPosition& webPosition); | 64 virtual bool lastPosition(WebGeolocationPosition& webPosition); |
68 | 65 |
69 private: | 66 private: |
70 WebGeolocationClientMock(); | 67 WebGeolocationClientMock(); |
71 BLINK_EXPORT void reset(); | 68 BLINK_EXPORT void reset(); |
72 | 69 |
73 WebPrivateOwnPtr<WebCore::GeolocationClientMock> m_clientMock; | 70 WebPrivateOwnPtr<GeolocationClientMock> m_clientMock; |
74 }; | 71 }; |
75 } | 72 } |
76 | 73 |
77 #endif // WebGeolocationClientMock_h | 74 #endif // WebGeolocationClientMock_h |
OLD | NEW |