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

Unified Diff: device/nfc/nfc_peer_chromeos.h

Issue 2292703002: chromeos: Remove unused NFC D-Bus client library (Closed)
Patch Set: rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/nfc/nfc_peer.cc ('k') | device/nfc/nfc_peer_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/nfc/nfc_peer_chromeos.h
diff --git a/device/nfc/nfc_peer_chromeos.h b/device/nfc/nfc_peer_chromeos.h
deleted file mode 100644
index 6099067de95980a81166912946b844d19bfb7839..0000000000000000000000000000000000000000
--- a/device/nfc/nfc_peer_chromeos.h
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef DEVICE_NFC_NFC_PEER_CHROMEOS_H_
-#define DEVICE_NFC_NFC_PEER_CHROMEOS_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "chromeos/dbus/nfc_record_client.h"
-#include "dbus/object_path.h"
-#include "device/nfc/nfc_ndef_record.h"
-#include "device/nfc/nfc_peer.h"
-
-namespace chromeos {
-
-// The NfcPeerChromeOS class implements NfcPeer for the Chrome OS platform.
-class NfcPeerChromeOS : public device::NfcPeer,
- public NfcRecordClient::Observer {
- public:
- // NfcPeer overrides.
- void AddObserver(device::NfcPeer::Observer* observer) override;
- void RemoveObserver(device::NfcPeer::Observer* observer) override;
- std::string GetIdentifier() const override;
- const device::NfcNdefMessage& GetNdefMessage() const override;
- void PushNdef(const device::NfcNdefMessage& message,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- void StartHandover(HandoverType handover_type,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
-
- private:
- friend class NfcAdapterChromeOS;
-
- // Mapping from D-Bus object paths to NfcNdefRecord objects.
- typedef std::map<dbus::ObjectPath, device::NfcNdefRecord*> NdefRecordMap;
-
- explicit NfcPeerChromeOS(const dbus::ObjectPath& object_path);
- ~NfcPeerChromeOS() override;
-
- // NfcRecordClient::Observer overrides.
- void RecordAdded(const dbus::ObjectPath& object_path) override;
- void RecordRemoved(const dbus::ObjectPath& object_path) override;
- void RecordPropertiesReceived(const dbus::ObjectPath& object_path) override;
-
- // Called by dbus:: on completion of the D-Bus method call to push an NDEF.
- void OnPushNdef(const base::Closure& callback);
- void OnPushNdefError(const ErrorCallback& error_callback,
- const std::string& error_name,
- const std::string& error_message);
-
- // Creates a record object for the record with object path |object_path| and
- // notifies the observers, if a record object did not already exist for it.
- void AddRecord(const dbus::ObjectPath& object_path);
-
- // Object path of the peer that we are currently tracking.
- dbus::ObjectPath object_path_;
-
- // A map containing the NDEF records that were received from the peer.
- NdefRecordMap records_;
-
- // Message instance that contains pointers to all created records.
- device::NfcNdefMessage message_;
-
- // List of observers interested in event notifications from us.
- base::ObserverList<device::NfcPeer::Observer> observers_;
-
- // Note: This should remain the last member so it'll be destroyed and
- // invalidate its weak pointers before any other members are destroyed.
- base::WeakPtrFactory<NfcPeerChromeOS> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(NfcPeerChromeOS);
-};
-
-} // namespace chromeos
-
-#endif // DEVICE_NFC_NFC_PEER_CHROMEOS_H_
« no previous file with comments | « device/nfc/nfc_peer.cc ('k') | device/nfc/nfc_peer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698