OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.device.nfc; | 5 package org.chromium.device.nfc; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 | 8 |
9 import org.chromium.base.Callback; | 9 import org.chromium.base.Callback; |
10 | 10 |
11 /** Interface that allows the NFC implementation to access the Activity associat
ed with a given | 11 /** Interface that allows the NFC implementation to access the Activity associat
ed with a given |
12 * client. |hostId| is the same ID passed in NFCProvider::GetNFCForHost(). | 12 * client. |hostId| is the same ID passed in NFCProvider::GetNFCForHost(). |
13 */ | 13 */ |
14 public interface NfcDelegate { | 14 public interface NfcDelegate { |
15 /** Calls |callback| with the Activity associated with |hostId|, and subsequ
ently calls | 15 /** Calls |callback| with the Activity associated with |hostId|, and subsequ
ently calls |
16 * |callback| again whenever the Activity associated with |hostId| changes. | 16 * |callback| again whenever the Activity associated with |hostId| changes. |
17 */ | 17 */ |
18 void trackActivityForHost(int hostId, Callback<Activity> callback); | 18 void trackActivityForHost(int hostId, Callback<Activity> callback); |
19 | 19 |
20 /** Called when the NFC implementation no longer needs to track the Activity
associated with | 20 /** Called when the NFC implementation no longer needs to track the Activity
associated with |
21 * |hostId|. | 21 * |hostId|. |
22 */ | 22 */ |
23 void stopTrackingActivityForHost(int hostId); | 23 void stopTrackingActivityForHost(int hostId); |
24 } | 24 } |
OLD | NEW |