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

Side by Side Diff: device/bluetooth/bluetooth_adapter_chromeos.cc

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted BluetoothDevice interface. Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "device/bluetooth/bluetooth_adapter_chromeos.h" 5 #include "device/bluetooth/bluetooth_adapter_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 28 matching lines...) Expand all
39 AddObserver(this); 39 AddObserver(this);
40 } 40 }
41 41
42 BluetoothAdapterChromeOS::~BluetoothAdapterChromeOS() { 42 BluetoothAdapterChromeOS::~BluetoothAdapterChromeOS() {
43 DBusThreadManager::Get()->GetBluetoothDeviceClient()-> 43 DBusThreadManager::Get()->GetBluetoothDeviceClient()->
44 RemoveObserver(this); 44 RemoveObserver(this);
45 DBusThreadManager::Get()->GetBluetoothAdapterClient()-> 45 DBusThreadManager::Get()->GetBluetoothAdapterClient()->
46 RemoveObserver(this); 46 RemoveObserver(this);
47 DBusThreadManager::Get()->GetBluetoothManagerClient()-> 47 DBusThreadManager::Get()->GetBluetoothManagerClient()->
48 RemoveObserver(this); 48 RemoveObserver(this);
49
50 STLDeleteValues(&devices_);
51 } 49 }
52 50
53 void BluetoothAdapterChromeOS::AddObserver( 51 void BluetoothAdapterChromeOS::AddObserver(
54 BluetoothAdapter::Observer* observer) { 52 BluetoothAdapter::Observer* observer) {
55 DCHECK(observer); 53 DCHECK(observer);
56 observers_.AddObserver(observer); 54 observers_.AddObserver(observer);
57 } 55 }
58 56
59 void BluetoothAdapterChromeOS::RemoveObserver( 57 void BluetoothAdapterChromeOS::RemoveObserver(
60 BluetoothAdapter::Observer* observer) { 58 BluetoothAdapter::Observer* observer) {
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 VLOG(1) << "Paired device " << device->address() 529 VLOG(1) << "Paired device " << device->address()
532 << " is no longer visible to the adapter"; 530 << " is no longer visible to the adapter";
533 device->SetVisible(false); 531 device->SetVisible(false);
534 532
535 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_, 533 FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
536 DeviceChanged(this, device)); 534 DeviceChanged(this, device));
537 } 535 }
538 } 536 }
539 537
540 } // namespace chromeos 538 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698