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 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <queue> | 10 #include <queue> |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // audio nodes unplugged. | 284 // audio nodes unplugged. |
285 bool NonActiveDeviceUnplugged(size_t old_devices_size, | 285 bool NonActiveDeviceUnplugged(size_t old_devices_size, |
286 size_t new_device_size, | 286 size_t new_device_size, |
287 uint64_t current_active_node); | 287 uint64_t current_active_node); |
288 | 288 |
289 // Returns true if there is any device change for for input or output, | 289 // Returns true if there is any device change for for input or output, |
290 // specified by |is_input|. | 290 // specified by |is_input|. |
291 // The new discovered nodes are returned in |new_discovered|. | 291 // The new discovered nodes are returned in |new_discovered|. |
292 bool HasDeviceChange(const AudioNodeList& new_nodes, | 292 bool HasDeviceChange(const AudioNodeList& new_nodes, |
293 bool is_input, | 293 bool is_input, |
294 AudioNodeList* new_discovered); | 294 AudioDevicePriorityQueue* new_discovered); |
295 | 295 |
296 // Handles dbus callback for GetNodes. | 296 // Handles dbus callback for GetNodes. |
297 void HandleGetNodes(const chromeos::AudioNodeList& node_list, bool success); | 297 void HandleGetNodes(const chromeos::AudioNodeList& node_list, bool success); |
298 | 298 |
299 // Handles the dbus error callback. | 299 // Handles the dbus error callback. |
300 void HandleGetNodesError(const std::string& error_name, | 300 void HandleGetNodesError(const std::string& error_name, |
301 const std::string& error_msg); | 301 const std::string& error_msg); |
302 | 302 |
303 // Adds an active node. | 303 // Adds an active node. |
304 // If there is no active node, |node_id| will be switched to become the | 304 // If there is no active node, |node_id| will be switched to become the |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 bool hdmi_rediscovering_; | 363 bool hdmi_rediscovering_; |
364 | 364 |
365 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 365 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
366 | 366 |
367 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 367 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
368 }; | 368 }; |
369 | 369 |
370 } // namespace chromeos | 370 } // namespace chromeos |
371 | 371 |
372 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 372 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
OLD | NEW |