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

Unified Diff: chromeos/dbus/fake_cras_audio_client.h

Issue 1274403003: Full Implementation of Audio for the Chrome Os Device Emulator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/fake_cras_audio_client.h
diff --git a/chromeos/dbus/fake_cras_audio_client.h b/chromeos/dbus/fake_cras_audio_client.h
index ab5b9f79cedf1e1131821129eeb8e10f901ddb1c..cb15ab6b3df7efccd899b5efaabc2d321d431484 100644
--- a/chromeos/dbus/fake_cras_audio_client.h
+++ b/chromeos/dbus/fake_cras_audio_client.h
@@ -38,6 +38,14 @@ class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient {
void RemoveActiveOutputNode(uint64 node_id) override;
void SwapLeftRight(uint64 node_id, bool swap) override;
+ // Modifies an AudioNode from |node_list_| based on |audio_node.id|.
+ // if the |audio_node.id| cannot be found in list, Add an
+ // AudioNode to |node_list_|
+ void InsertAudioNodeToList(const AudioNode& audio_node);
+
+ // Removes an AudioNode from |node_list_| based on |node_id|.
+ void RemoveAudioNodeFromList(const uint64& node_id);
+
// Updates |node_list_| to contain |audio_nodes|.
void SetAudioNodesForTesting(const AudioNodeList& audio_nodes);
@@ -45,7 +53,14 @@ class CHROMEOS_EXPORT FakeCrasAudioClient : public CrasAudioClient {
void SetAudioNodesAndNotifyObserversForTesting(
const AudioNodeList& new_nodes);
+ const AudioNodeList& node_list() const { return node_list_; }
+ const uint64& active_input_node_id() const { return active_input_node_id_; }
+ const uint64& active_output_node_id() const { return active_output_node_id_; }
+
private:
+ // Find a node in the list based on the id.
+ AudioNodeList::iterator FindNode(uint64 node_id);
+
VolumeState volume_state_;
AudioNodeList node_list_;
uint64 active_input_node_id_;
« no previous file with comments | « chrome/browser/ui/webui/chromeos/emulator/device_emulator_ui.cc ('k') | chromeos/dbus/fake_cras_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698