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

Side by Side Diff: chrome/browser/device_orientation/accelerometer_mac.h

Issue 3275002: Added tested and corrected accelerometer support for the following MacBook / MacBook Pro models: (Closed)
Patch Set: Created 10 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/device_orientation/accelerometer_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 virtual ~AccelerometerMac(); 72 virtual ~AccelerometerMac();
73 73
74 private: 74 private:
75 AccelerometerMac(); 75 AccelerometerMac();
76 bool Init(); 76 bool Init();
77 77
78 // Extend the sign of an integer of size bytes to a 32-bit one. 78 // Extend the sign of an integer of size bytes to a 32-bit one.
79 static int ExtendSign(int value, size_t size); 79 static int ExtendSign(int value, size_t size);
80 80
81 struct GenericMacbookSensor;
81 struct SensorDescriptor; 82 struct SensorDescriptor;
82 struct AxisData; 83 struct AxisData;
83 84
84 // List of supported sensors. 85 // Generic sensor data and list of supported sensors.
86 static const GenericMacbookSensor kGenericSensor;
85 static const SensorDescriptor kSupportedSensors[]; 87 static const SensorDescriptor kSupportedSensors[];
86 88
87 // Local sensor if supported, else NULL. 89 // Local sensor if supported, else NULL.
88 const SensorDescriptor* sensor_; 90 const SensorDescriptor* sensor_;
89 91
90 // IOKit connection to the local sensor. 92 // IOKit connection to the local sensor.
91 io_connect_t io_connection_; 93 io_connect_t io_connection_;
92 94
93 // Input memory used for sensor I/O. 95 // Input memory used for sensor I/O.
94 std::vector<char> input_record_; 96 std::vector<char> input_record_;
95 97
96 // Output memory used for sensor I/O. 98 // Output memory used for sensor I/O.
97 std::vector<char> output_record_; 99 std::vector<char> output_record_;
98 }; 100 };
99 101
100 } // namespace device_orientation 102 } // namespace device_orientation
101 103
102 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_ 104 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_ACCELEROMETER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/device_orientation/accelerometer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698