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

Side by Side Diff: chromeos/dbus/cras_audio_client.cc

Issue 1380103003: Store audio device's active state in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix string format Created 4 years, 11 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
« no previous file with comments | « chromeos/dbus/audio_node.cc ('k') | extensions/browser/api/audio/audio_apitest.cc » ('j') | 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) 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 return false; 407 return false;
408 } else if (key == cras::kActiveProperty) { 408 } else if (key == cras::kActiveProperty) {
409 if (!value_reader.PopBool(&node->active)) 409 if (!value_reader.PopBool(&node->active))
410 return false; 410 return false;
411 } else if (key == cras::kPluggedTimeProperty) { 411 } else if (key == cras::kPluggedTimeProperty) {
412 if (!value_reader.PopUint64(&node->plugged_time)) 412 if (!value_reader.PopUint64(&node->plugged_time))
413 return false; 413 return false;
414 } else if (key == cras::kMicPositionsProperty) { 414 } else if (key == cras::kMicPositionsProperty) {
415 if (!value_reader.PopString(&node->mic_positions)) 415 if (!value_reader.PopString(&node->mic_positions))
416 return false; 416 return false;
417 } else if (key == cras::kStableDeviceIdProperty) {
418 if (!value_reader.PopUint64(&node->stable_device_id))
419 return false;
417 } 420 }
418 } 421 }
419 422
420 return true; 423 return true;
421 } 424 }
422 425
423 dbus::ObjectProxy* cras_proxy_; 426 dbus::ObjectProxy* cras_proxy_;
424 base::ObserverList<Observer> observers_; 427 base::ObserverList<Observer> observers_;
425 428
426 // Note: This should remain the last member so it'll be destroyed and 429 // Note: This should remain the last member so it'll be destroyed and
(...skipping 27 matching lines...) Expand all
454 457
455 CrasAudioClient::~CrasAudioClient() { 458 CrasAudioClient::~CrasAudioClient() {
456 } 459 }
457 460
458 // static 461 // static
459 CrasAudioClient* CrasAudioClient::Create() { 462 CrasAudioClient* CrasAudioClient::Create() {
460 return new CrasAudioClientImpl(); 463 return new CrasAudioClientImpl();
461 } 464 }
462 465
463 } // namespace chromeos 466 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/audio_node.cc ('k') | extensions/browser/api/audio/audio_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698