| 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/bluetooth_input_client.h" | 5 #include "chromeos/dbus/bluetooth_input_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 BluetoothInputClient::Properties::~Properties() { | 28 BluetoothInputClient::Properties::~Properties() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 | 31 |
| 32 // The BluetoothInputClient implementation used in production. | 32 // The BluetoothInputClient implementation used in production. |
| 33 class BluetoothInputClientImpl | 33 class BluetoothInputClientImpl |
| 34 : public BluetoothInputClient, | 34 : public BluetoothInputClient, |
| 35 public dbus::ObjectManager::Interface { | 35 public dbus::ObjectManager::Interface { |
| 36 public: | 36 public: |
| 37 BluetoothInputClientImpl() : weak_ptr_factory_(this) {} | 37 BluetoothInputClientImpl() : object_manager_(NULL), weak_ptr_factory_(this) {} |
| 38 | 38 |
| 39 virtual ~BluetoothInputClientImpl() { | 39 virtual ~BluetoothInputClientImpl() { |
| 40 object_manager_->UnregisterInterface( | 40 object_manager_->UnregisterInterface( |
| 41 bluetooth_input::kBluetoothInputInterface); | 41 bluetooth_input::kBluetoothInputInterface); |
| 42 } | 42 } |
| 43 | 43 |
| 44 // BluetoothInputClient override. | 44 // BluetoothInputClient override. |
| 45 virtual void AddObserver(BluetoothInputClient::Observer* observer) | 45 virtual void AddObserver(BluetoothInputClient::Observer* observer) |
| 46 OVERRIDE { | 46 OVERRIDE { |
| 47 DCHECK(observer); | 47 DCHECK(observer); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 BluetoothInputClient::~BluetoothInputClient() { | 134 BluetoothInputClient::~BluetoothInputClient() { |
| 135 } | 135 } |
| 136 | 136 |
| 137 BluetoothInputClient* BluetoothInputClient::Create() { | 137 BluetoothInputClient* BluetoothInputClient::Create() { |
| 138 return new BluetoothInputClientImpl(); | 138 return new BluetoothInputClientImpl(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace chromeos | 141 } // namespace chromeos |
| OLD | NEW |