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

Side by Side Diff: chromeos/audio/cras_audio_handler.h

Issue 1817093003: Host-side implementation of ARC audio bridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused override and update data type. Created 4 years, 8 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 | « no previous file | components/arc.gypi » ('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 #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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 // If necessary, sets the starting point for re-discovering the active HDMI 212 // If necessary, sets the starting point for re-discovering the active HDMI
213 // output device caused by device entering/exiting docking mode, HDMI display 213 // output device caused by device entering/exiting docking mode, HDMI display
214 // changing resolution, or chromeos device suspend/resume. If 214 // changing resolution, or chromeos device suspend/resume. If
215 // |force_rediscovering| is true, it will force to set the starting point for 215 // |force_rediscovering| is true, it will force to set the starting point for
216 // re-discovering the active HDMI output device again if it has been in the 216 // re-discovering the active HDMI output device again if it has been in the
217 // middle of rediscovering the HDMI active output device. 217 // middle of rediscovering the HDMI active output device.
218 virtual void SetActiveHDMIOutoutRediscoveringIfNecessary( 218 virtual void SetActiveHDMIOutoutRediscoveringIfNecessary(
219 bool force_rediscovering); 219 bool force_rediscovering);
220 220
221 virtual const AudioDevice* GetDeviceFromId(uint64_t device_id) const;
222
221 protected: 223 protected:
222 explicit CrasAudioHandler( 224 explicit CrasAudioHandler(
223 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler); 225 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler);
224 ~CrasAudioHandler() override; 226 ~CrasAudioHandler() override;
225 227
226 private: 228 private:
227 friend class CrasAudioHandlerTest; 229 friend class CrasAudioHandlerTest;
228 230
229 // CrasAudioClient::Observer overrides. 231 // CrasAudioClient::Observer overrides.
230 void AudioClientRestarted() override; 232 void AudioClientRestarted() override;
(...skipping 22 matching lines...) Expand all
253 DeviceActivateType activate_by); 255 DeviceActivateType activate_by);
254 256
255 // Sets up the audio device state based on audio policy and audio settings 257 // Sets up the audio device state based on audio policy and audio settings
256 // saved in prefs. 258 // saved in prefs.
257 void SetupAudioInputState(); 259 void SetupAudioInputState();
258 void SetupAudioOutputState(); 260 void SetupAudioOutputState();
259 261
260 // Sets up the additional active audio node's state. 262 // Sets up the additional active audio node's state.
261 void SetupAdditionalActiveAudioNodeState(uint64_t node_id); 263 void SetupAdditionalActiveAudioNodeState(uint64_t node_id);
262 264
263 const AudioDevice* GetDeviceFromId(uint64_t device_id) const;
264 const AudioDevice* GetDeviceFromStableDeviceId( 265 const AudioDevice* GetDeviceFromStableDeviceId(
265 uint64_t stable_device_id) const; 266 uint64_t stable_device_id) const;
266 const AudioDevice* GetKeyboardMic() const; 267 const AudioDevice* GetKeyboardMic() const;
267 268
268 // Initializes audio state, which should only be called when CrasAudioHandler 269 // Initializes audio state, which should only be called when CrasAudioHandler
269 // is created or cras audio client is restarted. 270 // is created or cras audio client is restarted.
270 void InitializeAudioState(); 271 void InitializeAudioState();
271 272
272 void InitializeAudioAfterCrasServiceAvailable(bool service_is_available); 273 void InitializeAudioAfterCrasServiceAvailable(bool service_is_available);
273 274
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 bool cras_service_available_ = false; 419 bool cras_service_available_ = false;
419 420
420 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; 421 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_;
421 422
422 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); 423 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);
423 }; 424 };
424 425
425 } // namespace chromeos 426 } // namespace chromeos
426 427
427 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 428 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | components/arc.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698