diff options
author | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 23:24:19 +0000 |
---|---|---|
committer | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-20 23:24:19 +0000 |
commit | 13aa72068571a09f84d6bd2524cf6d9ca190f214 (patch) | |
tree | 77b4587e072bdfdde5ac0e95db8292acbf0211f9 /device/nfc/nfc_peer.h | |
parent | 57afa12e2f3d503b2cea20ecd50a47930156305a (diff) | |
download | chromium_src-13aa72068571a09f84d6bd2524cf6d9ca190f214.zip chromium_src-13aa72068571a09f84d6bd2524cf6d9ca190f214.tar.gz chromium_src-13aa72068571a09f84d6bd2524cf6d9ca190f214.tar.bz2 |
nfc: Implement device::NfcPeerChromeOS.
Implemented device::NfcPeer for Chrome OS. With this, Chrome can now
interact with remote NFC adapters.
BUG=316471
TEST=device_unittests
Review URL: https://codereview.chromium.org/112183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/nfc/nfc_peer.h')
-rw-r--r-- | device/nfc/nfc_peer.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/device/nfc/nfc_peer.h b/device/nfc/nfc_peer.h index 1578738..710641e 100644 --- a/device/nfc/nfc_peer.h +++ b/device/nfc/nfc_peer.h @@ -37,12 +37,12 @@ class NfcPeer { public: virtual ~Observer() {} - // This method will be called when an NDEF message |message| from the peer + // This method will be called when an NDEF record |record| from the peer // device |peer| is received. Users can use this method to be notified of // new records on the device and when the initial set of records are - // received from it, if any. - virtual void RecordsReceived(NfcPeer* peer, - const NfcNdefMessage& message) {} + // received from it, if any. All records received from |peer| can be + // accessed by calling |peer->GetNdefMessage()|. + virtual void RecordsReceived(NfcPeer* peer, const NfcNdefRecord* record) {} }; // The ErrorCallback is used by methods to asynchronously report errors. @@ -64,12 +64,12 @@ class NfcPeer { // this only means that no records have yet been received from the device. // Users should use this method in conjunction with the Observer methods // to be notified when the records are ready. - virtual NfcNdefMessage GetNdefMessage() const = 0; + virtual const NfcNdefMessage& GetNdefMessage() const = 0; // Sends the NDEF records contained in |message| to the peer device. On // success, |callback| will be invoked. On failure, |error_callback| will be // invoked. - virtual void PushNdef(NfcNdefMessage* message, + virtual void PushNdef(const NfcNdefMessage& message, const base::Closure& callback, const ErrorCallback& error_callback) = 0; |