OLD | NEW |
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 CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Called on main thread. | 54 // Called on main thread. |
55 void StartCapture(); | 55 void StartCapture(); |
56 void StopCapture(); | 56 void StopCapture(); |
57 // Closes the stream. Make sure to call this before the object is destructed. | 57 // Closes the stream. Make sure to call this before the object is destructed. |
58 void ShutDown(); | 58 void ShutDown(); |
59 | 59 |
60 // media::AudioInputIPCDelegate. | 60 // media::AudioInputIPCDelegate. |
61 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 61 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
62 base::SyncSocket::Handle socket_handle, | 62 base::SyncSocket::Handle socket_handle, |
63 int length, | 63 int length, |
64 int total_segments) OVERRIDE; | 64 int total_segments) override; |
65 virtual void OnVolume(double volume) OVERRIDE; | 65 virtual void OnVolume(double volume) override; |
66 virtual void OnStateChanged(media::AudioInputIPCDelegate::State state) | 66 virtual void OnStateChanged(media::AudioInputIPCDelegate::State state) |
67 OVERRIDE; | 67 override; |
68 virtual void OnIPCClosed() OVERRIDE; | 68 virtual void OnIPCClosed() override; |
69 | 69 |
70 protected: | 70 protected: |
71 virtual ~PepperPlatformAudioInput(); | 71 virtual ~PepperPlatformAudioInput(); |
72 | 72 |
73 private: | 73 private: |
74 friend class base::RefCountedThreadSafe<PepperPlatformAudioInput>; | 74 friend class base::RefCountedThreadSafe<PepperPlatformAudioInput>; |
75 | 75 |
76 PepperPlatformAudioInput(); | 76 PepperPlatformAudioInput(); |
77 | 77 |
78 bool Initialize(int render_frame_id, | 78 bool Initialize(int render_frame_id, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 bool pending_open_device_; | 127 bool pending_open_device_; |
128 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD. | 128 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD. |
129 int pending_open_device_id_; | 129 int pending_open_device_id_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput); | 131 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace content | 134 } // namespace content |
135 | 135 |
136 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ | 136 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ |
OLD | NEW |