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 // Multiply-included message file, hence no include guard. | 5 // Multiply-included message file, hence no include guard. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/shared_memory.h" | |
10 #include "base/sync_socket.h" | |
9 #include "content/public/common/speech_recognition_error.h" | 11 #include "content/public/common/speech_recognition_error.h" |
10 #include "content/public/common/speech_recognition_grammar.h" | 12 #include "content/public/common/speech_recognition_grammar.h" |
11 #include "content/public/common/speech_recognition_result.h" | 13 #include "content/public/common/speech_recognition_result.h" |
12 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
13 #include "ipc/ipc_param_traits.h" | 15 #include "ipc/ipc_param_traits.h" |
16 #include "media/audio/audio_parameters.h" | |
14 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
15 | 18 |
16 #define IPC_MESSAGE_START SpeechRecognitionMsgStart | 19 #define IPC_MESSAGE_START SpeechRecognitionMsgStart |
17 | 20 |
18 IPC_ENUM_TRAITS_MAX_VALUE(content::SpeechAudioErrorDetails, | 21 IPC_ENUM_TRAITS_MAX_VALUE(content::SpeechAudioErrorDetails, |
19 content::SPEECH_AUDIO_ERROR_DETAILS_LAST) | 22 content::SPEECH_AUDIO_ERROR_DETAILS_LAST) |
20 IPC_ENUM_TRAITS_MAX_VALUE(content::SpeechRecognitionErrorCode, | 23 IPC_ENUM_TRAITS_MAX_VALUE(content::SpeechRecognitionErrorCode, |
21 content::SPEECH_RECOGNITION_ERROR_LAST) | 24 content::SPEECH_RECOGNITION_ERROR_LAST) |
22 | 25 |
23 IPC_STRUCT_TRAITS_BEGIN(content::SpeechRecognitionError) | 26 IPC_STRUCT_TRAITS_BEGIN(content::SpeechRecognitionError) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 // Speech grammars to use. | 58 // Speech grammars to use. |
56 IPC_STRUCT_MEMBER(content::SpeechRecognitionGrammarArray, grammars) | 59 IPC_STRUCT_MEMBER(content::SpeechRecognitionGrammarArray, grammars) |
57 // URL of the page (or iframe if applicable). | 60 // URL of the page (or iframe if applicable). |
58 IPC_STRUCT_MEMBER(std::string, origin_url) | 61 IPC_STRUCT_MEMBER(std::string, origin_url) |
59 // Maximum number of hypotheses allowed for each results. | 62 // Maximum number of hypotheses allowed for each results. |
60 IPC_STRUCT_MEMBER(uint32, max_hypotheses) | 63 IPC_STRUCT_MEMBER(uint32, max_hypotheses) |
61 // Whether the user requested continuous recognition or not. | 64 // Whether the user requested continuous recognition or not. |
62 IPC_STRUCT_MEMBER(bool, continuous) | 65 IPC_STRUCT_MEMBER(bool, continuous) |
63 // Whether the user requested interim results or not. | 66 // Whether the user requested interim results or not. |
64 IPC_STRUCT_MEMBER(bool, interim_results) | 67 IPC_STRUCT_MEMBER(bool, interim_results) |
68 // Wheter user has set an audio track as input | |
no longer working on chromium
2014/09/29 09:28:56
nit, end with period
burnik
2014/09/29 10:24:31
Done.
| |
69 IPC_STRUCT_MEMBER(bool, using_audio_track) | |
65 IPC_STRUCT_END() | 70 IPC_STRUCT_END() |
66 | 71 |
67 | 72 |
68 // Requests the speech recognition service to start speech recognition. | 73 // Requests the speech recognition service to start speech recognition. |
69 IPC_MESSAGE_CONTROL1(SpeechRecognitionHostMsg_StartRequest, | 74 IPC_MESSAGE_CONTROL1(SpeechRecognitionHostMsg_StartRequest, |
70 SpeechRecognitionHostMsg_StartRequest_Params) | 75 SpeechRecognitionHostMsg_StartRequest_Params) |
71 | 76 |
72 // Requests the speech recognition service to abort speech recognition on | 77 // Requests the speech recognition service to abort speech recognition on |
73 // behalf of the given |render_view_id| and |request_id|. If there are no | 78 // behalf of the given |render_view_id| and |request_id|. If there are no |
74 // sessions associated with the |request_id| in the render view, this call | 79 // sessions associated with the |request_id| in the render view, this call |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 | 112 |
108 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_AudioStarted, int /* request_id */) | 113 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_AudioStarted, int /* request_id */) |
109 | 114 |
110 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_SoundStarted, int /* request_id */) | 115 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_SoundStarted, int /* request_id */) |
111 | 116 |
112 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_SoundEnded, int /* request_id */) | 117 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_SoundEnded, int /* request_id */) |
113 | 118 |
114 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_AudioEnded, int /* request_id */) | 119 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_AudioEnded, int /* request_id */) |
115 | 120 |
116 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_Ended, int /* request_id */) | 121 IPC_MESSAGE_ROUTED1(SpeechRecognitionMsg_Ended, int /* request_id */) |
122 | |
123 IPC_MESSAGE_ROUTED4(SpeechRecognitionMsg_AudioTrackReady, | |
124 int /* request_id */, | |
125 media::AudioParameters /* params */, | |
126 base::SharedMemoryHandle /* memory */, | |
127 base::SyncSocket::TransitDescriptor /* socket */) | |
OLD | NEW |