| 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 24 matching lines...) Expand all Loading... |
| 35 #include "GeolocationService.h" | 35 #include "GeolocationService.h" |
| 36 #include "Geoposition.h" | 36 #include "Geoposition.h" |
| 37 #include "PlatformString.h" | 37 #include "PlatformString.h" |
| 38 #include "PositionError.h" | 38 #include "PositionError.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 // Provides an interface for GeolocationServiceChromium to call into the embedde
r. | 42 // Provides an interface for GeolocationServiceChromium to call into the embedde
r. |
| 43 class GeolocationServiceBridge { | 43 class GeolocationServiceBridge { |
| 44 public: | 44 public: |
| 45 virtual ~GeolocationServiceBridge(); |
| 45 // Called by GeolocationServiceChromium. | 46 // Called by GeolocationServiceChromium. |
| 46 virtual bool startUpdating(PositionOptions*) = 0; | 47 virtual bool startUpdating(PositionOptions*) = 0; |
| 47 virtual void stopUpdating() = 0; | 48 virtual void stopUpdating() = 0; |
| 48 virtual void suspend() = 0; | 49 virtual void suspend() = 0; |
| 49 virtual void resume() = 0; | 50 virtual void resume() = 0; |
| 50 | 51 |
| 51 // Called by the embedder, to identify this bridge. | 52 // Called by the embedder, to identify this bridge. |
| 52 virtual int getBridgeId() const = 0; | 53 virtual int getBridgeId() const = 0; |
| 53 virtual void attachBridgeIfNeeded() = 0; | 54 virtual void attachBridgeIfNeeded() = 0; |
| 54 }; | 55 }; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 private: | 78 private: |
| 78 Geolocation* m_geolocation; | 79 Geolocation* m_geolocation; |
| 79 OwnPtr<GeolocationServiceBridge> m_geolocationServiceBridge; | 80 OwnPtr<GeolocationServiceBridge> m_geolocationServiceBridge; |
| 80 RefPtr<Geoposition> m_lastPosition; | 81 RefPtr<Geoposition> m_lastPosition; |
| 81 RefPtr<PositionError> m_lastError; | 82 RefPtr<PositionError> m_lastError; |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace WebCore | 85 } // namespace WebCore |
| 85 | 86 |
| 86 #endif // GeolocationServiceChromium_h | 87 #endif // GeolocationServiceChromium_h |
| OLD | NEW |