| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/cras_audio_client.h" | 5 #include "chromeos/dbus/cras_audio_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 return false; | 401 return false; |
| 402 } else if (key == cras::kNameProperty) { | 402 } else if (key == cras::kNameProperty) { |
| 403 if (!value_reader.PopString(&node->name)) | 403 if (!value_reader.PopString(&node->name)) |
| 404 return false; | 404 return false; |
| 405 } else if (key == cras::kActiveProperty) { | 405 } else if (key == cras::kActiveProperty) { |
| 406 if (!value_reader.PopBool(&node->active)) | 406 if (!value_reader.PopBool(&node->active)) |
| 407 return false; | 407 return false; |
| 408 } else if (key == cras::kPluggedTimeProperty) { | 408 } else if (key == cras::kPluggedTimeProperty) { |
| 409 if (!value_reader.PopUint64(&node->plugged_time)) | 409 if (!value_reader.PopUint64(&node->plugged_time)) |
| 410 return false; | 410 return false; |
| 411 } else if (key == cras::kMicPositionsProperty) { |
| 412 if (!value_reader.PopString(&node->mic_positions)) |
| 413 return false; |
| 411 } | 414 } |
| 412 } | 415 } |
| 413 | 416 |
| 414 return true; | 417 return true; |
| 415 } | 418 } |
| 416 | 419 |
| 417 dbus::ObjectProxy* cras_proxy_; | 420 dbus::ObjectProxy* cras_proxy_; |
| 418 base::ObserverList<Observer> observers_; | 421 base::ObserverList<Observer> observers_; |
| 419 | 422 |
| 420 // Note: This should remain the last member so it'll be destroyed and | 423 // Note: This should remain the last member so it'll be destroyed and |
| (...skipping 29 matching lines...) Expand all Loading... |
| 450 | 453 |
| 451 CrasAudioClient::~CrasAudioClient() { | 454 CrasAudioClient::~CrasAudioClient() { |
| 452 } | 455 } |
| 453 | 456 |
| 454 // static | 457 // static |
| 455 CrasAudioClient* CrasAudioClient::Create() { | 458 CrasAudioClient* CrasAudioClient::Create() { |
| 456 return new CrasAudioClientImpl(); | 459 return new CrasAudioClientImpl(); |
| 457 } | 460 } |
| 458 | 461 |
| 459 } // namespace chromeos | 462 } // namespace chromeos |
| OLD | NEW |