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

Unified Diff: content/browser/geolocation/libgps_wrapper_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
Index: content/browser/geolocation/libgps_wrapper_linux.h
diff --git a/content/browser/geolocation/libgps_wrapper_linux.h b/content/browser/geolocation/libgps_wrapper_linux.h
deleted file mode 100644
index 08ad1a52105a1acc7b2a2f0d8da9884e2c290c28..0000000000000000000000000000000000000000
--- a/content/browser/geolocation/libgps_wrapper_linux.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Defines a wrapper around the C libgps API (gps.h). Similar to the libgpsmm.h
-// API provided by that package.
-
-#ifndef CONTENT_BROWSER_GEOLOCATION_LIBGPS_WRAPPER_LINUX_H_
-#define CONTENT_BROWSER_GEOLOCATION_LIBGPS_WRAPPER_LINUX_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/common/content_export.h"
-
-struct gps_data_t;
-
-namespace content {
-struct Geoposition;
-
-class CONTENT_EXPORT LibGps {
- public:
- virtual ~LibGps();
- // Attempts to dynamically load the libgps.so library and returns NULL on
- // failure.
- static LibGps* New();
-
- bool Start();
- void Stop();
- bool Read(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);
-
- // Returns false if there is not fix available.
- virtual bool GetPositionIfFixed(Geoposition* position);
-
- private:
- void* dl_handle_;
- gps_open_fn gps_open_;
- gps_close_fn gps_close_;
- gps_read_fn gps_read_;
-
- scoped_ptr<gps_data_t> gps_data_;
- bool is_open_;
-
- DISALLOW_COPY_AND_ASSIGN(LibGps);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_GEOLOCATION_LIBGPS_WRAPPER_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698