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 #include "ppapi/cpp/dev/audio_input_dev.h" | 5 #include "ppapi/cpp/dev/audio_input_dev.h" |
6 | 6 |
7 #include "ppapi/c/pp_bool.h" | 7 #include "ppapi/c/pp_bool.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/cpp/dev/resource_array_dev.h" | |
10 #include "ppapi/cpp/instance_handle.h" | 9 #include "ppapi/cpp/instance_handle.h" |
11 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
12 | 11 |
13 namespace pp { | 12 namespace pp { |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 template <> const char* interface_name<PPB_AudioInput_Dev_0_3>() { | 16 template <> const char* interface_name<PPB_AudioInput_Dev_0_3>() { |
18 return PPB_AUDIO_INPUT_DEV_INTERFACE_0_3; | 17 return PPB_AUDIO_INPUT_DEV_INTERFACE_0_3; |
19 } | 18 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 131 |
133 void AudioInput_Dev::Close() { | 132 void AudioInput_Dev::Close() { |
134 if (has_interface<PPB_AudioInput_Dev_0_4>()) { | 133 if (has_interface<PPB_AudioInput_Dev_0_4>()) { |
135 get_interface<PPB_AudioInput_Dev_0_4>()->Close(pp_resource()); | 134 get_interface<PPB_AudioInput_Dev_0_4>()->Close(pp_resource()); |
136 } else if (has_interface<PPB_AudioInput_Dev_0_3>()) { | 135 } else if (has_interface<PPB_AudioInput_Dev_0_3>()) { |
137 get_interface<PPB_AudioInput_Dev_0_3>()->Close(pp_resource()); | 136 get_interface<PPB_AudioInput_Dev_0_3>()->Close(pp_resource()); |
138 } | 137 } |
139 } | 138 } |
140 | 139 |
141 } // namespace pp | 140 } // namespace pp |
OLD | NEW |