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 <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "media/audio/audio_input_ipc.h" | 15 #include "media/audio/audio_input_ipc.h" |
16 #include "media/audio/audio_parameters.h" | 16 #include "media/audio/audio_parameters.h" |
17 | 17 |
18 class GURL; | 18 class GURL; |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
22 } | 22 } |
23 | 23 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Can return NULL if the RenderFrame referenced by |render_frame_id_| has | 94 // Can return NULL if the RenderFrame referenced by |render_frame_id_| has |
95 // gone away. | 95 // gone away. |
96 PepperMediaDeviceManager* GetMediaDeviceManager(); | 96 PepperMediaDeviceManager* GetMediaDeviceManager(); |
97 | 97 |
98 // The client to notify when the stream is created. THIS MUST ONLY BE | 98 // The client to notify when the stream is created. THIS MUST ONLY BE |
99 // ACCESSED ON THE MAIN THREAD. | 99 // ACCESSED ON THE MAIN THREAD. |
100 PepperAudioInputHost* client_; | 100 PepperAudioInputHost* client_; |
101 | 101 |
102 // Used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE | 102 // Used to send/receive IPC. THIS MUST ONLY BE ACCESSED ON THE |
103 // I/O THREAD. | 103 // I/O THREAD. |
104 scoped_ptr<media::AudioInputIPC> ipc_; | 104 std::unique_ptr<media::AudioInputIPC> ipc_; |
105 | 105 |
106 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 106 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
107 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 107 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
108 | 108 |
109 // The frame containing the Pepper widget. | 109 // The frame containing the Pepper widget. |
110 int render_frame_id_; | 110 int render_frame_id_; |
111 | 111 |
112 // The unique ID to identify the opened device. THIS MUST ONLY BE ACCESSED ON | 112 // The unique ID to identify the opened device. THIS MUST ONLY BE ACCESSED ON |
113 // THE MAIN THREAD. | 113 // THE MAIN THREAD. |
114 std::string label_; | 114 std::string label_; |
(...skipping 11 matching lines...) Expand all Loading... |
126 bool pending_open_device_; | 126 bool pending_open_device_; |
127 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD. | 127 // THIS MUST ONLY BE ACCESSED ON THE MAIN THREAD. |
128 int pending_open_device_id_; | 128 int pending_open_device_id_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput); | 130 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInput); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
134 | 134 |
135 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ | 135 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_INPUT_H_ |
OLD | NEW |