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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/nfc/NfcIntentHandler.java

Issue 1938393003: [webnfc] WIP: Implement push method for Android nfc mojo service. Base URL: https://chromium.googlesource.com/chromium/src.git@implement_nfc_push_in_blink
Patch Set: Created 4 years, 7 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.nfc;
6
7 import android.content.Context;
8 import android.content.Intent;
9 import android.nfc.NfcAdapter;
10 import android.support.v4.content.LocalBroadcastManager;
11
12 /**
13 * When NFC mojo service enables foreground dispatch for NFC adapter, chrome
14 * can receive intent that contains NfcAdapter.EXTRA_TAG. Forward such Intents
15 * to NFC mojo service.
16 */
17 public final class NfcIntentHandler {
18 public static boolean handleIntent(final Context context, final Intent inten t) {
19 if (!intent.hasExtra(NfcAdapter.EXTRA_TAG)) return false;
20 LocalBroadcastManager manager = LocalBroadcastManager.getInstance(contex t);
21 return manager.sendBroadcast(intent);
22 }
23 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698