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

Side by Side Diff: content/browser/device_orientation/accelerometer_mac.cc

Issue 6672074: New accelerometer data from Raul Cuza. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 // Tested by sfiera, pjw on a 13" MacBook Air. 140 // Tested by sfiera, pjw on a 13" MacBook Air.
141 { "MacBookAir2,1", NULL, { { 0, true }, { 2, true }, { 4, false } } }, 141 { "MacBookAir2,1", NULL, { { 0, true }, { 2, true }, { 4, false } } },
142 142
143 // Note: MacBookAir3,1 (11" MacBook Air) and MacBookAir3,2 (13" MacBook Air) 143 // Note: MacBookAir3,1 (11" MacBook Air) and MacBookAir3,2 (13" MacBook Air)
144 // have no accelerometer sensors. 144 // have no accelerometer sensors.
145 145
146 // Tested by crc on a 15" MacBook Pro. 146 // Tested by crc on a 15" MacBook Pro.
147 { "MacBookPro1,1", NULL, { { 0, true }, { 2, true }, { 4, false } } }, 147 { "MacBookPro1,1", NULL, { { 0, true }, { 2, true }, { 4, false } } },
148 148
149 // Tested by Raul Cuza (via avi) on a 17" MacBook Pro.
150 { "MacBookPro1,2", NULL, { { 0, true }, { 2, true }, { 4, false } } },
151
149 // Tested by L.V. (via avi) on a 17" MacBook Pro. 152 // Tested by L.V. (via avi) on a 17" MacBook Pro.
150 { "MacBookPro2,1", NULL, { { 0, true }, { 2, false }, { 4, true } } }, 153 { "MacBookPro2,1", NULL, { { 0, true }, { 2, false }, { 4, true } } },
151 154
152 // Tested by leandrogracia on a 15" MacBook Pro. 155 // Tested by leandrogracia on a 15" MacBook Pro.
153 { "MacBookPro2,2", NULL, { { 0, true }, { 2, true }, { 4, false } } }, 156 { "MacBookPro2,2", NULL, { { 0, true }, { 2, true }, { 4, false } } },
154 157
155 // Tested by S.Som. (via avi) on a 17" MacBook Pro. 158 // Tested by S.Som. (via avi) on a 17" MacBook Pro.
156 { "MacBookPro3,1", "Mac-F42388C8", 159 { "MacBookPro3,1", "Mac-F42388C8",
157 { { 0, true }, { 2, false }, { 4, true } } }, 160 { { 0, true }, { 2, false }, { 4, true } } },
158 161
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 195
193 // Tested by avi on a 15" MacBook Pro. 196 // Tested by avi on a 15" MacBook Pro.
194 { "MacBookPro8,2", NULL, { { 0, false }, { 2, false }, { 4, false } } }, 197 { "MacBookPro8,2", NULL, { { 0, false }, { 2, false }, { 4, false } } },
195 198
196 // Tested by avi on a 17" MacBook Pro. 199 // Tested by avi on a 17" MacBook Pro.
197 { "MacBookPro8,3", NULL, { { 0, false }, { 2, false }, { 4, false } } }, 200 { "MacBookPro8,3", NULL, { { 0, false }, { 2, false }, { 4, false } } },
198 201
199 // Generic MacBook accelerometer sensor data, used for both future models 202 // Generic MacBook accelerometer sensor data, used for both future models
200 // and past models for which there has been no testing. Note that this generic 203 // and past models for which there has been no testing. Note that this generic
201 // configuration may well have problems with inverted axes. 204 // configuration may well have problems with inverted axes.
202 // TODO(avi): Find these past models and test on them; test on future models. 205 // TODO(avi): Find this past model and test on it; test on future models.
203 // MacBook5,1 206 // MacBook5,1
204 // MacBookPro1,2
205 { "", NULL, { { 0, true }, { 2, true }, { 4, false } } } 207 { "", NULL, { { 0, true }, { 2, true }, { 4, false } } }
206 }; 208 };
207 209
208 // Create a AccelerometerMac object and return NULL if no valid sensor found. 210 // Create a AccelerometerMac object and return NULL if no valid sensor found.
209 DataFetcher* AccelerometerMac::Create() { 211 DataFetcher* AccelerometerMac::Create() {
210 scoped_ptr<AccelerometerMac> accelerometer(new AccelerometerMac); 212 scoped_ptr<AccelerometerMac> accelerometer(new AccelerometerMac);
211 return accelerometer->Init() ? accelerometer.release() : NULL; 213 return accelerometer->Init() ? accelerometer.release() : NULL;
212 } 214 }
213 215
214 AccelerometerMac::~AccelerometerMac() { 216 AccelerometerMac::~AccelerometerMac() {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 break; 442 break;
441 443
442 default: 444 default:
443 LOG(FATAL) << "Invalid integer size for sign extension: " << size; 445 LOG(FATAL) << "Invalid integer size for sign extension: " << size;
444 } 446 }
445 447
446 return value; 448 return value;
447 } 449 }
448 450
449 } // namespace device_orientation 451 } // namespace device_orientation
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698