OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Defines a variant of libgps wrapper for use with the 2.38 release of the API. | 5 // Defines a variant of libgps wrapper for use with the 2.38 release of the API. |
6 | 6 |
7 #include "content/browser/geolocation/libgps_wrapper_linux.h" | 7 #include "content/browser/geolocation/libgps_wrapper_linux.h" |
8 | 8 |
9 // This lot needed for DataWaiting() | 9 // This lot needed for DataWaiting() |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
11 #include <sys/time.h> | 11 #include <sys/time.h> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "chrome/common/geoposition.h" | 14 #include "content/common/geoposition.h" |
15 #include "third_party/gpsd/release-2.38/gps.h" | 15 #include "third_party/gpsd/release-2.38/gps.h" |
16 | 16 |
17 class LibGpsV238 : public LibGps { | 17 class LibGpsV238 : public LibGps { |
18 public: | 18 public: |
19 explicit LibGpsV238(LibGpsLibraryWrapper* dl_wrapper) : LibGps(dl_wrapper) {} | 19 explicit LibGpsV238(LibGpsLibraryWrapper* dl_wrapper) : LibGps(dl_wrapper) {} |
20 | 20 |
21 // LibGps | 21 // LibGps |
22 virtual bool StartStreaming() { | 22 virtual bool StartStreaming() { |
23 return library().query("w+x\n") == 0; | 23 return library().query("w+x\n") == 0; |
24 } | 24 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 private: | 62 private: |
63 DISALLOW_COPY_AND_ASSIGN(LibGpsV238); | 63 DISALLOW_COPY_AND_ASSIGN(LibGpsV238); |
64 }; | 64 }; |
65 | 65 |
66 LibGps* LibGps::NewV238(LibGpsLibraryWrapper* dl_wrapper) { | 66 LibGps* LibGps::NewV238(LibGpsLibraryWrapper* dl_wrapper) { |
67 return new LibGpsV238(dl_wrapper); | 67 return new LibGpsV238(dl_wrapper); |
68 } | 68 } |
OLD | NEW |