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

Side by Side Diff: device/nfc/nfc_adapter_factory.h

Issue 77563002: nfc: Add native NFC API definitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed NfcAdapterFactory::MaybeGetAdapter. Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #ifndef DEVICE_NFC_NFC_ADAPTER_FACTORY_H_
6 #define DEVICE_NFC_NFC_ADAPTER_FACTORY_H_
7
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "device/nfc/nfc_adapter.h"
11
12 namespace device {
13
14 // NfcAdapterFactory is a class that contains static methods, which
15 // instantiate either a specific NFC adapter, or the generic "default
16 // adapter" which may change depending on availability.
17 class NfcAdapterFactory {
18 public:
19 typedef base::Callback<void(scoped_refptr<NfcAdapter>)> AdapterCallback;
20
21 // Returns true if NFC is available for the current platform.
22 static bool IsNfcAvailable();
23
24 // Returns the shared instance of the default adapter, creating and
25 // initializing it if necessary. |callback| is called with the adapter
26 // instance passed only once the adapter is fully initialized and ready to
27 // use.
28 static void GetAdapter(const AdapterCallback& callback);
29 };
30
31 } // namespace device
32
33 #endif // DEVICE_NFC_NFC_ADAPTER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698