| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file is based on the SMSLib library. | 5 // This file is based on the SMSLib library. |
| 6 // | 6 // |
| 7 // SMSLib Sudden Motion Sensor Access Library | 7 // SMSLib Sudden Motion Sensor Access Library |
| 8 // Copyright (c) 2010 Suitable Systems | 8 // Copyright (c) 2010 Suitable Systems |
| 9 // All rights reserved. | 9 // All rights reserved. |
| 10 // | 10 // |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // | 41 // |
| 42 // For more information about SMSLib, see | 42 // For more information about SMSLib, see |
| 43 // <http://www.suitable.com/tools/smslib.html> | 43 // <http://www.suitable.com/tools/smslib.html> |
| 44 // or contact | 44 // or contact |
| 45 // Daniel Griscom | 45 // Daniel Griscom |
| 46 // Suitable Systems | 46 // Suitable Systems |
| 47 // 1 Centre Street, Suite 204 | 47 // 1 Centre Street, Suite 204 |
| 48 // Wakefield, MA 01880 | 48 // Wakefield, MA 01880 |
| 49 // (781) 665-0053 | 49 // (781) 665-0053 |
| 50 | 50 |
| 51 #include "chrome/browser/device_orientation/accelerometer_mac.h" | 51 #include "content/browser/device_orientation/accelerometer_mac.h" |
| 52 | 52 |
| 53 #include <math.h> | 53 #include <math.h> |
| 54 #include <sys/sysctl.h> | 54 #include <sys/sysctl.h> |
| 55 | 55 |
| 56 #include "base/logging.h" | 56 #include "base/logging.h" |
| 57 #include "base/scoped_ptr.h" | 57 #include "base/scoped_ptr.h" |
| 58 #include "chrome/browser/device_orientation/orientation.h" | 58 #include "content/browser/device_orientation/orientation.h" |
| 59 | 59 |
| 60 namespace device_orientation { | 60 namespace device_orientation { |
| 61 | 61 |
| 62 struct AccelerometerMac::GenericMacbookSensor { | 62 struct AccelerometerMac::GenericMacbookSensor { |
| 63 // Name of device to be read. | 63 // Name of device to be read. |
| 64 const char* service_name; | 64 const char* service_name; |
| 65 | 65 |
| 66 // Number of bytes of the axis data. | 66 // Number of bytes of the axis data. |
| 67 int axis_size; | 67 int axis_size; |
| 68 | 68 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 break; | 403 break; |
| 404 | 404 |
| 405 default: | 405 default: |
| 406 LOG(FATAL) << "Invalid integer size for sign extension: " << size; | 406 LOG(FATAL) << "Invalid integer size for sign extension: " << size; |
| 407 } | 407 } |
| 408 | 408 |
| 409 return value; | 409 return value; |
| 410 } | 410 } |
| 411 | 411 |
| 412 } // namespace device_orientation | 412 } // namespace device_orientation |
| OLD | NEW |