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

Side by Side Diff: chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc

Issue 10823371: Handle Bluetooth Adapter address updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" 5 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 if (property_name == properties->powered.name()) { 326 if (property_name == properties->powered.name()) {
327 PoweredChanged(properties->powered.value()); 327 PoweredChanged(properties->powered.value());
328 328
329 } else if (property_name == properties->discovering.name()) { 329 } else if (property_name == properties->discovering.name()) {
330 DiscoveringChanged(properties->discovering.value()); 330 DiscoveringChanged(properties->discovering.value());
331 331
332 } else if (property_name == properties->devices.name()) { 332 } else if (property_name == properties->devices.name()) {
333 DevicesChanged(properties->devices.value()); 333 DevicesChanged(properties->devices.value());
334 334
335 } else if (property_name == properties->address.name()) {
336 address_ = properties->address.value();
337
335 } 338 }
336 } 339 }
337 340
338 void BluetoothAdapter::DevicePropertyChanged( 341 void BluetoothAdapter::DevicePropertyChanged(
339 const dbus::ObjectPath& device_path, 342 const dbus::ObjectPath& device_path,
340 const std::string& property_name) { 343 const std::string& property_name) {
341 UpdateDevice(device_path); 344 UpdateDevice(device_path);
342 } 345 }
343 346
344 void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) { 347 void BluetoothAdapter::UpdateDevice(const dbus::ObjectPath& device_path) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 562 }
560 563
561 // static 564 // static
562 BluetoothAdapter* BluetoothAdapter::Create(const std::string& address) { 565 BluetoothAdapter* BluetoothAdapter::Create(const std::string& address) {
563 BluetoothAdapter* adapter = new BluetoothAdapter; 566 BluetoothAdapter* adapter = new BluetoothAdapter;
564 adapter->FindAdapter(address); 567 adapter->FindAdapter(address);
565 return adapter; 568 return adapter;
566 } 569 }
567 570
568 } // namespace chromeos 571 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698