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

Unified Diff: chrome/browser/ui/android/bluetooth_chooser_android.cc

Issue 1481553002: jni: Pass method parameters as JavaParamRef in chrome/browser/ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/bluetooth_chooser_android.cc
diff --git a/chrome/browser/ui/android/bluetooth_chooser_android.cc b/chrome/browser/ui/android/bluetooth_chooser_android.cc
index 0b35ad4d211507c78c85ac797f98aadbc414eea5..ce47b51cba2069d78dafba49300627d13bd3c304 100644
--- a/chrome/browser/ui/android/bluetooth_chooser_android.cc
+++ b/chrome/browser/ui/android/bluetooth_chooser_android.cc
@@ -98,10 +98,11 @@ void BluetoothChooserAndroid::RemoveDevice(const std::string& device_id) {
java_device_id.obj());
}
-void BluetoothChooserAndroid::OnDialogFinished(JNIEnv* env,
- jobject obj,
- jint event_type,
- jstring device_id) {
+void BluetoothChooserAndroid::OnDialogFinished(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ jint event_type,
+ const JavaParamRef<jstring>& device_id) {
// Values are defined in BluetoothChooserDialog as DIALOG_FINISHED constants.
switch (event_type) {
case 0:
@@ -119,27 +120,32 @@ void BluetoothChooserAndroid::OnDialogFinished(JNIEnv* env,
NOTREACHED();
}
-void BluetoothChooserAndroid::RestartSearch(JNIEnv* env, jobject obj) {
+void BluetoothChooserAndroid::RestartSearch(JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
event_handler_.Run(Event::RESCAN, "");
}
-void BluetoothChooserAndroid::ShowBluetoothOverviewLink(JNIEnv* env,
- jobject obj) {
+void BluetoothChooserAndroid::ShowBluetoothOverviewLink(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
event_handler_.Run(Event::SHOW_OVERVIEW_HELP, "");
}
-void BluetoothChooserAndroid::ShowBluetoothPairingLink(JNIEnv* env,
- jobject obj) {
+void BluetoothChooserAndroid::ShowBluetoothPairingLink(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
event_handler_.Run(Event::SHOW_PAIRING_HELP, "");
}
-void BluetoothChooserAndroid::ShowBluetoothAdapterOffLink(JNIEnv* env,
- jobject obj) {
+void BluetoothChooserAndroid::ShowBluetoothAdapterOffLink(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
event_handler_.Run(Event::SHOW_ADAPTER_OFF_HELP, "");
}
-void BluetoothChooserAndroid::ShowNeedLocationPermissionLink(JNIEnv* env,
- jobject obj) {
+void BluetoothChooserAndroid::ShowNeedLocationPermissionLink(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
event_handler_.Run(Event::SHOW_NEED_LOCATION_HELP, "");
}
« no previous file with comments | « chrome/browser/ui/android/bluetooth_chooser_android.h ('k') | chrome/browser/ui/android/chrome_http_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698