cc: Invalidate eviction cache in cases where we remove/add tiles.
[chromium-blink-merge.git] / device / nfc / nfc_adapter_factory.h
blobb813f913cba2790de7559d9f01d479595aa14c90
1 // Copyright 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.
5 #ifndef DEVICE_NFC_NFC_ADAPTER_FACTORY_H_
6 #define DEVICE_NFC_NFC_ADAPTER_FACTORY_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "device/nfc/nfc_adapter.h"
12 namespace device {
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;
21 // Returns true if NFC is available for the current platform.
22 static bool IsNfcAvailable();
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);
31 } // namespace device
33 #endif // DEVICE_NFC_NFC_ADAPTER_FACTORY_H_