summaryrefslogtreecommitdiffstats
path: root/content/browser/device_orientation/data_fetcher_impl_android.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/device_orientation/data_fetcher_impl_android.cc')
-rw-r--r--content/browser/device_orientation/data_fetcher_impl_android.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/content/browser/device_orientation/data_fetcher_impl_android.cc b/content/browser/device_orientation/data_fetcher_impl_android.cc
index 6f54192..0354635 100644
--- a/content/browser/device_orientation/data_fetcher_impl_android.cc
+++ b/content/browser/device_orientation/data_fetcher_impl_android.cc
@@ -70,8 +70,13 @@ bool DataFetcherImplAndroid::GetOrientation(Orientation* orientation) {
void DataFetcherImplAndroid::GotOrientation(
JNIEnv*, jobject, double alpha, double beta, double gamma) {
base::AutoLock autolock(next_orientation_lock_);
- next_orientation_.reset(
- new Orientation(true, alpha, true, beta, true, gamma, true, true));
+
+ Orientation* orientation = new Orientation();
+ orientation->set_alpha(alpha);
+ orientation->set_beta(beta);
+ orientation->set_gamma(gamma);
+ orientation->set_absolute(true);
+ next_orientation_.reset(orientation);
}
bool DataFetcherImplAndroid::Start(int rate_in_milliseconds) {