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

Side by Side Diff: media/audio/audio_output_ipc.h

Issue 1171953002: Add IPC interface for switching the audio output device for a given audio stream in the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix style Created 5 years, 6 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 | « media/audio/audio_logging.h ('k') | media/audio/fake_audio_log_factory.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
7 7
8 #include <string>
9
8 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
9 #include "base/sync_socket.h" 11 #include "base/sync_socket.h"
10 #include "media/audio/audio_parameters.h" 12 #include "media/audio/audio_parameters.h"
11 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "url/gurl.h"
12 15
13 namespace media { 16 namespace media {
14 17
18 // Result of an audio output device switch operation
19 enum SwitchOutputDeviceResult {
20 SWITCH_OUTPUT_DEVICE_RESULT_SUCCESS = 0,
21 SWITCH_OUTPUT_DEVICE_RESULT_ERROR_NOT_FOUND,
22 SWITCH_OUTPUT_DEVICE_RESULT_ERROR_NOT_AUTHORIZED,
23 SWITCH_OUTPUT_DEVICE_RESULT_ERROR_OBSOLETE,
24 SWITCH_OUTPUT_DEVICE_RESULT_ERROR_NOT_SUPPORTED,
25 SWITCH_OUTPUT_DEVICE_RESULT_LAST =
26 SWITCH_OUTPUT_DEVICE_RESULT_ERROR_NOT_SUPPORTED,
27 };
28
15 // Contains IPC notifications for the state of the server side 29 // Contains IPC notifications for the state of the server side
16 // (AudioOutputController) audio state changes and when an AudioOutputController 30 // (AudioOutputController) audio state changes and when an AudioOutputController
17 // has been created. Implemented by AudioOutputDevice. 31 // has been created. Implemented by AudioOutputDevice.
18 class MEDIA_EXPORT AudioOutputIPCDelegate { 32 class MEDIA_EXPORT AudioOutputIPCDelegate {
19 public: 33 public:
20 // Current status of the audio output stream in the browser process. Browser 34 // Current status of the audio output stream in the browser process. Browser
21 // sends information about the current playback state and error to the 35 // sends information about the current playback state and error to the
22 // renderer process using this type. 36 // renderer process using this type.
23 enum State { 37 enum State {
24 kPlaying, 38 kPlaying,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // AudioOutputController in the peer process. 96 // AudioOutputController in the peer process.
83 virtual void CloseStream() = 0; 97 virtual void CloseStream() = 0;
84 98
85 // Sets the volume of the audio stream. 99 // Sets the volume of the audio stream.
86 virtual void SetVolume(double volume) = 0; 100 virtual void SetVolume(double volume) = 0;
87 }; 101 };
88 102
89 } // namespace media 103 } // namespace media
90 104
91 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 105 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
OLDNEW
« no previous file with comments | « media/audio/audio_logging.h ('k') | media/audio/fake_audio_log_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698