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

Side by Side Diff: chromeos/accelerometer/accelerometer_types.h

Issue 934843002: Implement DeviceMotionEvent API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Thread Safety Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 5 #ifndef CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_
6 #define CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 6 #define CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chromeos/chromeos_export.h" 9 #include "chromeos/chromeos_export.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void Set(AccelerometerSource source, float x, float y, float z) { 60 void Set(AccelerometerSource source, float x, float y, float z) {
61 data_[source].present = true; 61 data_[source].present = true;
62 data_[source].x = x; 62 data_[source].x = x;
63 data_[source].y = y; 63 data_[source].y = y;
64 data_[source].z = z; 64 data_[source].z = z;
65 } 65 }
66 66
67 protected: 67 protected:
68 AccelerometerReading data_[ACCELEROMETER_SOURCE_COUNT]; 68 AccelerometerReading data_[ACCELEROMETER_SOURCE_COUNT];
69
70 private:
71 DISALLOW_COPY_AND_ASSIGN(AccelerometerUpdate);
flackr 2015/02/25 23:15:17 If this needs to be copyable, style guide says tha
jonross 2015/03/02 15:18:10 The threadsafe observer runs its notifies async, w
72 }; 69 };
73 70
74 } // namespace chromeos 71 } // namespace chromeos
75 72
76 #endif // CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 73 #endif // CHROMEOS_ACCELEROMETER_ACCELEROMETER_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698