| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual void stopUpdating(); | 72 virtual void stopUpdating(); |
| 73 virtual void suspend(); | 73 virtual void suspend(); |
| 74 virtual void resume(); | 74 virtual void resume(); |
| 75 virtual int getBridgeId() const; | 75 virtual int getBridgeId() const; |
| 76 virtual void attachBridgeIfNeeded(); | 76 virtual void attachBridgeIfNeeded(); |
| 77 | 77 |
| 78 // WebGeolocationServiceBridge | 78 // WebGeolocationServiceBridge |
| 79 virtual void setIsAllowed(bool allowed); | 79 virtual void setIsAllowed(bool allowed); |
| 80 virtual void setLastPosition(double latitude, double longitude, bool provide
sAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, doub
le altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, d
ouble speed, long long timestamp); | 80 virtual void setLastPosition(double latitude, double longitude, bool provide
sAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, doub
le altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, d
ouble speed, long long timestamp); |
| 81 virtual void setLastError(int errorCode, const WebString& message); | 81 virtual void setLastError(int errorCode, const WebString& message); |
| 82 virtual void onWebGeolocationServiceDestroyed(); |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 WebViewClient* getWebViewClient(); | 85 WebViewClient* getWebViewClient(); |
| 85 | 86 |
| 86 // GeolocationServiceChromium owns us, we only have a pointer back to it. | 87 // GeolocationServiceChromium owns us, we only have a pointer back to it. |
| 87 GeolocationServiceChromium* m_GeolocationServiceChromium; | 88 GeolocationServiceChromium* m_GeolocationServiceChromium; |
| 88 int m_bridgeId; | 89 int m_bridgeId; |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceC
hromium* geolocationServiceChromium) | 92 GeolocationServiceBridge* createGeolocationServiceBridgeImpl(GeolocationServiceC
hromium* geolocationServiceChromium) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 WebViewClient* WebGeolocationServiceBridgeImpl::getWebViewClient() | 170 WebViewClient* WebGeolocationServiceBridgeImpl::getWebViewClient() |
| 170 { | 171 { |
| 171 Frame* frame = m_GeolocationServiceChromium->frame(); | 172 Frame* frame = m_GeolocationServiceChromium->frame(); |
| 172 if (!frame || !frame->page()) | 173 if (!frame || !frame->page()) |
| 173 return 0; | 174 return 0; |
| 174 WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClien
tImpl*>(frame->page()->chrome()->client()); | 175 WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClien
tImpl*>(frame->page()->chrome()->client()); |
| 175 WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client()
; | 176 WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client()
; |
| 176 return webViewClient; | 177 return webViewClient; |
| 177 } | 178 } |
| 178 | 179 |
| 180 void WebGeolocationServiceBridgeImpl::onWebGeolocationServiceDestroyed() |
| 181 { |
| 182 } |
| 183 |
| 179 } // namespace WebKit | 184 } // namespace WebKit |
| 180 | 185 |
| 181 #endif // ENABLE(GEOLOCATION) | 186 #endif // ENABLE(GEOLOCATION) |
| OLD | NEW |