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

Unified Diff: device/nfc/nfc_adapter_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_adapter.cc ('k') | device/nfc/nfc_adapter_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/nfc/nfc_adapter_chromeos.h
diff --git a/device/nfc/nfc_adapter_chromeos.h b/device/nfc/nfc_adapter_chromeos.h
deleted file mode 100644
index a35b76def3659a0593067860ab7e4d9efab05d1e..0000000000000000000000000000000000000000
--- a/device/nfc/nfc_adapter_chromeos.h
+++ /dev/null
@@ -1,113 +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_ADAPTER_CHROMEOS_H_
-#define DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "base/observer_list.h"
-#include "chromeos/dbus/nfc_adapter_client.h"
-#include "chromeos/dbus/nfc_device_client.h"
-#include "chromeos/dbus/nfc_tag_client.h"
-#include "dbus/object_path.h"
-#include "device/nfc/nfc_adapter.h"
-
-namespace device {
-
-class NfcAdapterFactory;
-
-} // namespace device
-
-namespace chromeos {
-
-// The NfcAdapterChromeOS class implements NfcAdapter for the Chrome OS
-// platform.
-class NfcAdapterChromeOS : public device::NfcAdapter,
- public chromeos::NfcAdapterClient::Observer,
- public chromeos::NfcDeviceClient::Observer,
- public chromeos::NfcTagClient::Observer {
- public:
- // NfcAdapter overrides.
- void AddObserver(NfcAdapter::Observer* observer) override;
- void RemoveObserver(NfcAdapter::Observer* observer) override;
- bool IsPresent() const override;
- bool IsPowered() const override;
- bool IsPolling() const override;
- bool IsInitialized() const override;
- void SetPowered(bool powered,
- const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- void StartPolling(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
- void StopPolling(const base::Closure& callback,
- const ErrorCallback& error_callback) override;
-
- private:
- friend class device::NfcAdapterFactory;
- friend class NfcChromeOSTest;
-
- NfcAdapterChromeOS();
- ~NfcAdapterChromeOS() override;
-
- // NfcAdapterClient::Observer overrides.
- void AdapterAdded(const dbus::ObjectPath& object_path) override;
- void AdapterRemoved(const dbus::ObjectPath& object_path) override;
- void AdapterPropertyChanged(const dbus::ObjectPath& object_path,
- const std::string& property_name) override;
-
- // NfcDeviceClient::Observer overrides.
- void DeviceAdded(const dbus::ObjectPath& object_path) override;
- void DeviceRemoved(const dbus::ObjectPath& object_path) override;
-
- // NfcTagClient::Observer overrides.
- void TagAdded(const dbus::ObjectPath& object_path) override;
- void TagRemoved(const dbus::ObjectPath& object_path) override;
-
- // Set the tracked adapter to the one in |object_path|, this object will
- // subsequently operate on that adapter until it is removed.
- void SetAdapter(const dbus::ObjectPath& object_path);
-
- // Remove the currently tracked adapter. IsPresent() will return false after
- // this is called.
- void RemoveAdapter();
-
- // Announce to observers a change in the adapter state.
- void PoweredChanged(bool powered);
- void PollingChanged(bool polling);
- void PresentChanged(bool present);
-
- // Called by dbus:: on completion of the powered property change.
- void OnSetPowered(const base::Closure& callback,
- const ErrorCallback& error_callback,
- bool success);
-
- // Called by dbus:: on completion of the D-Bus method call to start polling.
- void OnStartPolling(const base::Closure& callback);
- void OnStartPollingError(const ErrorCallback& error_callback,
- const std::string& error_name,
- const std::string& error_message);
-
- // Called by dbus:: on completion of the D-Bus method call to stop polling.
- void OnStopPolling(const base::Closure& callback);
- void OnStopPollingError(const ErrorCallback& error_callback,
- const std::string& error_name,
- const std::string& error_message);
-
- // Object path of the adapter that we are currently tracking.
- dbus::ObjectPath object_path_;
-
- // List of observers interested in event notifications from us.
- base::ObserverList<device::NfcAdapter::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<NfcAdapterChromeOS> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(NfcAdapterChromeOS);
-};
-
-} // namespace chromeos
-
-#endif // DEVICE_NFC_NFC_ADAPTER_CHROMEOS_H_
« no previous file with comments | « device/nfc/nfc_adapter.cc ('k') | device/nfc/nfc_adapter_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698