| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos/dbus/nfc_manager_client.h" | 5 #include "chromeos/dbus/nfc_manager_client.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "chromeos/dbus/fake_nfc_manager_client.h" | |
| 11 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| 12 #include "third_party/cros_system_api/dbus/service_constants.h" | 11 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 13 | 12 |
| 14 namespace chromeos { | 13 namespace chromeos { |
| 15 | 14 |
| 16 NfcManagerClient::Properties::Properties( | 15 NfcManagerClient::Properties::Properties( |
| 17 dbus::ObjectProxy* object_proxy, | 16 dbus::ObjectProxy* object_proxy, |
| 18 const PropertyChangedCallback& callback) | 17 const PropertyChangedCallback& callback) |
| 19 : NfcPropertySet(object_proxy, | 18 : NfcPropertySet(object_proxy, |
| 20 nfc_manager::kNfcManagerInterface, | 19 nfc_manager::kNfcManagerInterface, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 DISALLOW_COPY_AND_ASSIGN(NfcManagerClientImpl); | 158 DISALLOW_COPY_AND_ASSIGN(NfcManagerClientImpl); |
| 160 }; | 159 }; |
| 161 | 160 |
| 162 NfcManagerClient::NfcManagerClient() { | 161 NfcManagerClient::NfcManagerClient() { |
| 163 } | 162 } |
| 164 | 163 |
| 165 NfcManagerClient::~NfcManagerClient() { | 164 NfcManagerClient::~NfcManagerClient() { |
| 166 } | 165 } |
| 167 | 166 |
| 168 // static | 167 // static |
| 169 NfcManagerClient* NfcManagerClient::Create(DBusClientImplementationType type) { | 168 NfcManagerClient* NfcManagerClient::Create() { |
| 170 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 169 return new NfcManagerClientImpl(); |
| 171 return new NfcManagerClientImpl(); | |
| 172 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | |
| 173 return new FakeNfcManagerClient(); | |
| 174 } | 170 } |
| 175 | 171 |
| 176 } // namespace chromeos | 172 } // namespace chromeos |
| OLD | NEW |