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 #include "content/browser/geolocation/win7_location_api_win.h" | 5 #include "content/browser/geolocation/win7_location_api_win.h" |
6 | 6 |
7 #include "base/base_paths_win.h" | 7 #include "base/base_paths_win.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/geoposition.h" | 14 #include "content/common/geoposition.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 const double kKnotsToMetresPerSecondConversionFactor = 0.5144; | 17 const double kKnotsToMetresPerSecondConversionFactor = 0.5144; |
18 | 18 |
19 void ConvertKnotsToMetresPerSecond(double* knots) { | 19 void ConvertKnotsToMetresPerSecond(double* knots) { |
20 *knots *= kKnotsToMetresPerSecondConversionFactor; | 20 *knots *= kKnotsToMetresPerSecondConversionFactor; |
21 } | 21 } |
22 | 22 |
23 HINSTANCE LoadWin7Library(const string16& lib_name) { | 23 HINSTANCE LoadWin7Library(const string16& lib_name) { |
24 FilePath sys_dir; | 24 FilePath sys_dir; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 return true; | 158 return true; |
159 } | 159 } |
160 | 160 |
161 bool Win7LocationApi::SetHighAccuracy(bool acc) { | 161 bool Win7LocationApi::SetHighAccuracy(bool acc) { |
162 HRESULT result_type; | 162 HRESULT result_type; |
163 result_type = locator_->SetDesiredAccuracy(IID_ILatLongReport, | 163 result_type = locator_->SetDesiredAccuracy(IID_ILatLongReport, |
164 acc ? LOCATION_DESIRED_ACCURACY_HIGH : | 164 acc ? LOCATION_DESIRED_ACCURACY_HIGH : |
165 LOCATION_DESIRED_ACCURACY_DEFAULT); | 165 LOCATION_DESIRED_ACCURACY_DEFAULT); |
166 return SUCCEEDED(result_type); | 166 return SUCCEEDED(result_type); |
167 } | 167 } |
OLD | NEW |