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

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

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change similarity to account for moved files Created 6 years 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 UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 5 #ifndef UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_
6 #define UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 6 #define UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/accelerometer/ui_accelerometer_export.h" 9 #include "ui/accelerometer/ui_accelerometer_export.h"
10 #include "ui/gfx/geometry/vector3d_f.h" 10 #include "ui/gfx/geometry/vector3d_f.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return data_[source].reading; 58 return data_[source].reading;
59 } 59 }
60 60
61 void Set(AccelerometerSource source, float x, float y, float z) { 61 void Set(AccelerometerSource source, float x, float y, float z) {
62 data_[source].present = true; 62 data_[source].present = true;
63 data_[source].reading.set_x(x); 63 data_[source].reading.set_x(x);
64 data_[source].reading.set_y(y); 64 data_[source].reading.set_y(y);
65 data_[source].reading.set_z(z); 65 data_[source].reading.set_z(z);
66 } 66 }
67 67
68 // A reading is considered stable if its deviation from gravity is small. This
69 // returns false if the deviation is too higher, or if |source| is not present
70 // in the update.
71 bool IsReadingStable(AccelerometerSource source) const;
flackr 2014/12/12 20:46:06 I don't think this should be a part of the Acceler
jonross 2015/01/06 19:56:10 Moved to chromeos/accelerometer/accelerometer_read
72
68 protected: 73 protected:
69 AccelerometerReading data_[ACCELEROMETER_SOURCE_COUNT]; 74 AccelerometerReading data_[ACCELEROMETER_SOURCE_COUNT];
70 75
71 DISALLOW_COPY_AND_ASSIGN(AccelerometerUpdate); 76 DISALLOW_COPY_AND_ASSIGN(AccelerometerUpdate);
72 }; 77 };
73 78
74 } // namespace ui 79 } // namespace ui
75 80
76 #endif // UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_ 81 #endif // UI_ACCELEROMETER_ACCELEROMETER_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698