| 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 #ifndef CONTENT_BROWSER_ANDROID_NFC_HOST_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_NFC_HOST_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_NFC_HOST_H_ | 6 #define CONTENT_BROWSER_ANDROID_NFC_HOST_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 #include "device/nfc/nfc_provider.mojom.h" | 10 #include "services/device/public/interfaces/nfc_provider.mojom.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 // On Android, NFC requires the Activity associated with the context in order to | 14 // On Android, NFC requires the Activity associated with the context in order to |
| 15 // access the NFC system APIs. NFCHost provides this functionality by mapping | 15 // access the NFC system APIs. NFCHost provides this functionality by mapping |
| 16 // NFC context IDs to the WebContents associated with those IDs. | 16 // NFC context IDs to the WebContents associated with those IDs. |
| 17 class NFCHost { | 17 class NFCHost { |
| 18 public: | 18 public: |
| 19 explicit NFCHost(WebContents* web_contents); | 19 explicit NFCHost(WebContents* web_contents); |
| 20 ~NFCHost(); | 20 ~NFCHost(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 device::nfc::mojom::NFCProviderPtr nfc_provider_; | 32 device::nfc::mojom::NFCProviderPtr nfc_provider_; |
| 33 | 33 |
| 34 base::android::ScopedJavaGlobalRef<jobject> java_nfc_host_; | 34 base::android::ScopedJavaGlobalRef<jobject> java_nfc_host_; |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(NFCHost); | 36 DISALLOW_COPY_AND_ASSIGN(NFCHost); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 } // namespace content | 39 } // namespace content |
| 40 | 40 |
| 41 #endif // CONTENT_BROWSER_ANDROID_NFC_HOST_H_ | 41 #endif // CONTENT_BROWSER_ANDROID_NFC_HOST_H_ |
| OLD | NEW |