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

Side by Side Diff: device/vr/android/cardboard/cardboard_vr_device.cc

Issue 2209993003: Add missing using statements for JNI types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « device/usb/usb_device_handle_android.cc ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #include "device/vr/android/cardboard/cardboard_vr_device.h" 5 #include "device/vr/android/cardboard/cardboard_vr_device.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/android/context_utils.h" 10 #include "base/android/context_utils.h"
11 #include "base/android/jni_android.h" 11 #include "base/android/jni_android.h"
12 #include "base/android/jni_array.h" 12 #include "base/android/jni_array.h"
13 #include "base/android/jni_string.h" 13 #include "base/android/jni_string.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "base/trace_event/trace_event.h" 17 #include "base/trace_event/trace_event.h"
18 #include "jni/CardboardVRDevice_jni.h" 18 #include "jni/CardboardVRDevice_jni.h"
19 #include "ui/gfx/transform.h" 19 #include "ui/gfx/transform.h"
20 #include "ui/gfx/transform_util.h" 20 #include "ui/gfx/transform_util.h"
21 21
22 using base::android::AttachCurrentThread; 22 using base::android::AttachCurrentThread;
23 using base::android::ScopedJavaLocalRef;
23 24
24 namespace device { 25 namespace device {
25 26
26 CardboardVRDevice::CardboardVRDevice(VRDeviceProvider* provider) 27 CardboardVRDevice::CardboardVRDevice(VRDeviceProvider* provider)
27 : VRDevice(provider) { 28 : VRDevice(provider) {
28 JNIEnv* env = AttachCurrentThread(); 29 JNIEnv* env = AttachCurrentThread();
29 j_cardboard_device_.Reset(Java_CardboardVRDevice_create( 30 j_cardboard_device_.Reset(Java_CardboardVRDevice_create(
30 env, base::android::GetApplicationContext())); 31 env, base::android::GetApplicationContext()));
31 j_head_matrix_.Reset(env, env->NewFloatArray(16)); 32 j_head_matrix_.Reset(env, env->NewFloatArray(16));
32 } 33 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 return pose; 146 return pose;
146 } 147 }
147 148
148 void CardboardVRDevice::ResetPose() { 149 void CardboardVRDevice::ResetPose() {
149 Java_CardboardVRDevice_resetSensor(AttachCurrentThread(), 150 Java_CardboardVRDevice_resetSensor(AttachCurrentThread(),
150 j_cardboard_device_.obj()); 151 j_cardboard_device_.obj());
151 } 152 }
152 153
153 } // namespace device 154 } // namespace device
OLDNEW
« no previous file with comments | « device/usb/usb_device_handle_android.cc ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698