CreateSessionAndGenerateRequest() to use enum for |init_data_type|
[chromium-blink-merge.git] / ui / chromeos / accelerometer / accelerometer_util.h
blob974fceb283850069bc3b664eef79f344ffa0544e
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_CHROMEOS_ACCELEROMETER_ACCELEROMETER_UTIL_H_
6 #define UI_CHROMEOS_ACCELEROMETER_ACCELEROMETER_UTIL_H_
8 #include "chromeos/accelerometer/accelerometer_types.h"
9 #include "ui/chromeos/ui_chromeos_export.h"
10 #include "ui/gfx/geometry/vector3d_f.h"
12 namespace ui {
14 // Converts the acceleration data in |reading| into a gfx::Vector3dF.
15 UI_CHROMEOS_EXPORT const gfx::Vector3dF ConvertAccelerometerReadingToVector3dF(
16 const chromeos::AccelerometerReading& reading);
18 // A reading is considered stable if its deviation from gravity is small. This
19 // returns false if the deviation is too high, or if |source| is not present
20 // in the update.
21 UI_CHROMEOS_EXPORT bool IsAccelerometerReadingStable(
22 const chromeos::AccelerometerUpdate& update,
23 chromeos::AccelerometerSource source);
25 } // namespace ui
27 #endif // UI_CHROMEOS_ACCELEROMETER_ACCELEROMETER_UTIL_H_