| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "content/public/browser/bluetooth_chooser.h" | 9 #include "content/public/browser/bluetooth_chooser.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // content::BluetoothChooser: | 21 // content::BluetoothChooser: |
| 22 bool CanAskForScanningPermission() override; | 22 bool CanAskForScanningPermission() override; |
| 23 void SetAdapterPresence(AdapterPresence presence) override; | 23 void SetAdapterPresence(AdapterPresence presence) override; |
| 24 void ShowDiscoveryState(DiscoveryState state) override; | 24 void ShowDiscoveryState(DiscoveryState state) override; |
| 25 void AddDevice(const std::string& device_id, | 25 void AddDevice(const std::string& device_id, |
| 26 const base::string16& device_name) override; | 26 const base::string16& device_name) override; |
| 27 void RemoveDevice(const std::string& device_id) override; | 27 void RemoveDevice(const std::string& device_id) override; |
| 28 | 28 |
| 29 // Report the dialog's result. | 29 // Report the dialog's result. |
| 30 void OnDialogFinished(JNIEnv* env, | 30 void OnDialogFinished(JNIEnv* env, |
| 31 jobject obj, | 31 const base::android::JavaParamRef<jobject>& obj, |
| 32 jint event_type, | 32 jint event_type, |
| 33 jstring device_id); | 33 const base::android::JavaParamRef<jstring>& device_id); |
| 34 | 34 |
| 35 // Notify bluetooth stack that the search needs to be re-issued. | 35 // Notify bluetooth stack that the search needs to be re-issued. |
| 36 void RestartSearch(JNIEnv* env, jobject obj); | 36 void RestartSearch(JNIEnv* env, |
| 37 const base::android::JavaParamRef<jobject>& obj); |
| 37 | 38 |
| 38 void ShowBluetoothOverviewLink(JNIEnv* env, jobject obj); | 39 void ShowBluetoothOverviewLink( |
| 39 void ShowBluetoothPairingLink(JNIEnv* env, jobject obj); | 40 JNIEnv* env, |
| 40 void ShowBluetoothAdapterOffLink(JNIEnv* env, jobject obj); | 41 const base::android::JavaParamRef<jobject>& obj); |
| 41 void ShowNeedLocationPermissionLink(JNIEnv* env, jobject obj); | 42 void ShowBluetoothPairingLink( |
| 43 JNIEnv* env, |
| 44 const base::android::JavaParamRef<jobject>& obj); |
| 45 void ShowBluetoothAdapterOffLink( |
| 46 JNIEnv* env, |
| 47 const base::android::JavaParamRef<jobject>& obj); |
| 48 void ShowNeedLocationPermissionLink( |
| 49 JNIEnv* env, |
| 50 const base::android::JavaParamRef<jobject>& obj); |
| 42 | 51 |
| 43 static bool Register(JNIEnv* env); | 52 static bool Register(JNIEnv* env); |
| 44 | 53 |
| 45 private: | 54 private: |
| 46 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; | 55 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; |
| 47 | 56 |
| 48 BluetoothChooser::EventHandler event_handler_; | 57 BluetoothChooser::EventHandler event_handler_; |
| 49 }; | 58 }; |
| 50 | 59 |
| 51 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ | 60 #endif // CHROME_BROWSER_UI_ANDROID_BLUETOOTH_CHOOSER_ANDROID_H_ |
| OLD | NEW |