Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: content/browser/geolocation/gps_location_provider_linux.h

Issue 11571036: Linux: use generated library loader for libgps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixlets Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/linux/system.gyp ('k') | content/browser/geolocation/gps_location_provider_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/gps_location_provider_linux.h
diff --git a/content/browser/geolocation/gps_location_provider_linux.h b/content/browser/geolocation/gps_location_provider_linux.h
index 0ccacc484088376d301db694529c791a35c1e84a..e93783c6761cfb77d1e56ec074bcfbafb7464c29 100644
--- a/content/browser/geolocation/gps_location_provider_linux.h
+++ b/content/browser/geolocation/gps_location_provider_linux.h
@@ -17,6 +17,10 @@
#include "content/common/content_export.h"
#include "content/public/common/geoposition.h"
+#if defined(USE_LIBGPS)
+#include "library_loaders/libgps.h"
+#endif
+
struct gps_data_t;
namespace content {
@@ -35,29 +39,19 @@ class CONTENT_EXPORT LibGps {
bool Read(content::Geoposition* position);
protected:
- typedef int (*gps_open_fn)(const char*, const char*, struct gps_data_t*);
- typedef int (*gps_close_fn)(struct gps_data_t*);
- typedef int (*gps_read_fn)(struct gps_data_t*);
-
- explicit LibGps(void* dl_handle,
- gps_open_fn gps_open,
- gps_close_fn gps_close,
- gps_read_fn gps_read);
+ LibGps();
// Returns false if there is no fix available.
virtual bool GetPositionIfFixed(content::Geoposition* position);
- private:
#if defined(USE_LIBGPS)
- void* dl_handle_;
- gps_open_fn gps_open_;
- gps_close_fn gps_close_;
- gps_read_fn gps_read_;
+ LibGpsLoader libgps_loader_;
scoped_ptr<gps_data_t> gps_data_;
bool is_open_;
#endif // defined(USE_LIBGPS)
+ private:
DISALLOW_COPY_AND_ASSIGN(LibGps);
};
« no previous file with comments | « build/linux/system.gyp ('k') | content/browser/geolocation/gps_location_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698