Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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. | |
| 4 | |
| 5 #include "content/browser/vibration/vibration_service_impl_android.h" | |
| 6 | |
| 7 #include "jni/VibrationService_jni.h" | |
| 8 | |
| 9 namespace content { | |
| 10 | |
| 11 VibrationServiceImplAndroid::VibrationServiceImplAndroid() { | |
| 12 java_vibration_service_.Reset( | |
| 13 content::Java_VibrationService_create( | |
|
Peter Beverloo
2013/06/13 11:27:45
nit: we're in content, the "content::" namespace p
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
| |
| 14 base::android::AttachCurrentThread(), | |
|
Peter Beverloo
2013/06/13 11:27:45
nit: you use base::android::AttachCurrentThread()
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
| |
| 15 base::android::GetApplicationContext())); | |
| 16 } | |
| 17 | |
| 18 VibrationServiceImplAndroid::~VibrationServiceImplAndroid() { | |
| 19 } | |
| 20 | |
| 21 void VibrationServiceImplAndroid::Vibrate(unsigned time) { | |
| 22 Java_VibrationService_vibrate( | |
|
Peter Beverloo
2013/06/13 11:27:45
nit: indenting. You can indent this line like the
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
| |
| 23 base::android::AttachCurrentThread(), | |
| 24 java_vibration_service_.obj(), | |
| 25 time); | |
| 26 } | |
| 27 | |
| 28 void VibrationServiceImplAndroid::CancelVibration() { | |
| 29 Java_VibrationService_cancelVibration( | |
|
Peter Beverloo
2013/06/13 11:27:45
dito
Michael van Ouwerkerk
2013/06/18 14:39:23
Done.
| |
| 30 base::android::AttachCurrentThread(), | |
| 31 java_vibration_service_.obj()); | |
| 32 } | |
| 33 | |
| 34 bool RegisterVibrationService(JNIEnv* env) { | |
| 35 return RegisterNativesImpl(env); | |
| 36 } | |
| 37 | |
| 38 } // namespace content | |
| OLD | NEW |