| 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 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.Manifest; | 7 import android.Manifest; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.content.BroadcastReceiver; | 9 import android.content.BroadcastReceiver; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 String mOrigin; | 60 String mOrigin; |
| 61 | 61 |
| 62 // The security level of the connection to the site wanting to pair with the | 62 // The security level of the connection to the site wanting to pair with the |
| 63 // bluetooth devices. For valid values see SecurityStateModel::SecurityLevel
. | 63 // bluetooth devices. For valid values see SecurityStateModel::SecurityLevel
. |
| 64 int mSecurityLevel; | 64 int mSecurityLevel; |
| 65 | 65 |
| 66 // A pointer back to the native part of the implementation for this dialog. | 66 // A pointer back to the native part of the implementation for this dialog. |
| 67 long mNativeBluetoothChooserDialogPtr; | 67 long mNativeBluetoothChooserDialogPtr; |
| 68 | 68 |
| 69 // Used to keep track of when the Mode Changed Receiver is registered. | 69 // Used to keep track of when the Mode Changed Receiver is registered. |
| 70 boolean mIsLocationModeChangedReceiverRegistered = false; | 70 boolean mIsLocationModeChangedReceiverRegistered; |
| 71 | 71 |
| 72 @VisibleForTesting | 72 @VisibleForTesting |
| 73 final BroadcastReceiver mLocationModeBroadcastReceiver = new BroadcastReceiv
er() { | 73 final BroadcastReceiver mLocationModeBroadcastReceiver = new BroadcastReceiv
er() { |
| 74 @Override | 74 @Override |
| 75 public void onReceive(Context context, Intent intent) { | 75 public void onReceive(Context context, Intent intent) { |
| 76 if (!LocationManager.MODE_CHANGED_ACTION.equals(intent.getAction()))
{ | 76 if (!LocationManager.MODE_CHANGED_ACTION.equals(intent.getAction()))
{ |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 if (checkLocationServicesAndPermission()) { | 79 if (checkLocationServicesAndPermission()) { |
| 80 mItemChooserDialog.clear(); | 80 mItemChooserDialog.clear(); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 @VisibleForTesting | 406 @VisibleForTesting |
| 407 native void nativeRestartSearch(long nativeBluetoothChooserAndroid); | 407 native void nativeRestartSearch(long nativeBluetoothChooserAndroid); |
| 408 // Help links. | 408 // Help links. |
| 409 @VisibleForTesting | 409 @VisibleForTesting |
| 410 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro
id); | 410 native void nativeShowBluetoothOverviewLink(long nativeBluetoothChooserAndro
id); |
| 411 @VisibleForTesting | 411 @VisibleForTesting |
| 412 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd
roid); | 412 native void nativeShowBluetoothAdapterOffLink(long nativeBluetoothChooserAnd
roid); |
| 413 @VisibleForTesting | 413 @VisibleForTesting |
| 414 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser
Android); | 414 native void nativeShowNeedLocationPermissionLink(long nativeBluetoothChooser
Android); |
| 415 } | 415 } |
| OLD | NEW |