[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "content/renderer/speech_recognition_dispatcher.h" |
| 6 | |
avi | 1023d01 | 2015-12-25 02:39:14 | [diff] [blame] | 7 | #include <stddef.h> |
| 8 | #include <stdint.h> |
dcheng | 07945f63 | 2015-12-26 07:59:32 | [diff] [blame] | 9 | #include <utility> |
avi | 1023d01 | 2015-12-25 02:39:14 | [diff] [blame] | 10 | |
[email protected] | 74ebfb1 | 2013-06-07 20:48:00 | [diff] [blame] | 11 | #include "base/strings/utf_string_conversions.h" |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 12 | #include "content/common/speech_recognition_messages.h" |
| 13 | #include "content/renderer/render_view_impl.h" |
[email protected] | 5c30b5e0 | 2013-05-30 03:46:08 | [diff] [blame] | 14 | #include "third_party/WebKit/public/platform/WebString.h" |
| 15 | #include "third_party/WebKit/public/platform/WebVector.h" |
[email protected] | 2255a933 | 2013-06-17 05:12:31 | [diff] [blame] | 16 | #include "third_party/WebKit/public/web/WebSpeechGrammar.h" |
| 17 | #include "third_party/WebKit/public/web/WebSpeechRecognitionParams.h" |
| 18 | #include "third_party/WebKit/public/web/WebSpeechRecognitionResult.h" |
| 19 | #include "third_party/WebKit/public/web/WebSpeechRecognizerClient.h" |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 20 | |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 21 | using blink::WebVector; |
| 22 | using blink::WebString; |
| 23 | using blink::WebSpeechGrammar; |
| 24 | using blink::WebSpeechRecognitionHandle; |
| 25 | using blink::WebSpeechRecognitionResult; |
| 26 | using blink::WebSpeechRecognitionParams; |
| 27 | using blink::WebSpeechRecognizerClient; |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 28 | |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 29 | namespace content { |
| 30 | |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 31 | SpeechRecognitionDispatcher::SpeechRecognitionDispatcher( |
| 32 | RenderViewImpl* render_view) |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 33 | : RenderViewObserver(render_view), |
Ivan Kotenkov | 2c0d2bb3 | 2017-11-01 15:41:28 | [diff] [blame] | 34 | recognizer_client_(nullptr), |
burnik | 2eeb466 | 2014-10-09 21:30:16 | [diff] [blame] | 35 | next_id_(1) {} |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 36 | |
burnik | 2eeb466 | 2014-10-09 21:30:16 | [diff] [blame] | 37 | SpeechRecognitionDispatcher::~SpeechRecognitionDispatcher() {} |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 38 | |
[email protected] | e976c3c5 | 2014-07-24 17:41:55 | [diff] [blame] | 39 | void SpeechRecognitionDispatcher::AbortAllRecognitions() { |
| 40 | Send(new SpeechRecognitionHostMsg_AbortAllRequests( |
| 41 | routing_id())); |
| 42 | } |
| 43 | |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 44 | bool SpeechRecognitionDispatcher::OnMessageReceived( |
| 45 | const IPC::Message& message) { |
| 46 | bool handled = true; |
| 47 | IPC_BEGIN_MESSAGE_MAP(SpeechRecognitionDispatcher, message) |
| 48 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_Started, OnRecognitionStarted) |
| 49 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_AudioStarted, OnAudioStarted) |
| 50 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_SoundStarted, OnSoundStarted) |
| 51 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_SoundEnded, OnSoundEnded) |
| 52 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_AudioEnded, OnAudioEnded) |
| 53 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_ErrorOccurred, OnErrorOccurred) |
| 54 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_Ended, OnRecognitionEnded) |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 55 | IPC_MESSAGE_HANDLER(SpeechRecognitionMsg_ResultRetrieved, |
| 56 | OnResultsRetrieved) |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 57 | IPC_MESSAGE_UNHANDLED(handled = false) |
| 58 | IPC_END_MESSAGE_MAP() |
| 59 | return handled; |
| 60 | } |
| 61 | |
xjz | 694b50a9 | 2016-06-07 21:49:37 | [diff] [blame] | 62 | void SpeechRecognitionDispatcher::OnDestruct() { |
| 63 | delete this; |
| 64 | } |
| 65 | |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 66 | void SpeechRecognitionDispatcher::Start( |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 67 | const WebSpeechRecognitionHandle& handle, |
| 68 | const WebSpeechRecognitionParams& params, |
| 69 | WebSpeechRecognizerClient* recognizer_client) { |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 70 | DCHECK(!recognizer_client_ || recognizer_client_ == recognizer_client); |
| 71 | recognizer_client_ = recognizer_client; |
| 72 | |
| 73 | SpeechRecognitionHostMsg_StartRequest_Params msg_params; |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 74 | for (size_t i = 0; i < params.Grammars().size(); ++i) { |
| 75 | const WebSpeechGrammar& grammar = params.Grammars()[i]; |
| 76 | msg_params.grammars.push_back(SpeechRecognitionGrammar( |
| 77 | grammar.Src().GetString().Utf8(), grammar.Weight())); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 78 | } |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 79 | msg_params.language = params.Language().Utf8(); |
| 80 | msg_params.max_hypotheses = static_cast<uint32_t>(params.MaxAlternatives()); |
| 81 | msg_params.continuous = params.Continuous(); |
| 82 | msg_params.interim_results = params.InterimResults(); |
| 83 | msg_params.origin_url = params.Origin().ToString().Utf8(); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 84 | msg_params.render_view_id = routing_id(); |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 85 | msg_params.request_id = GetOrCreateIDForHandle(handle); |
Max Morin | 5f93cebd | 2017-11-06 18:51:49 | [diff] [blame] | 86 | |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 87 | // The handle mapping will be removed in |OnRecognitionEnd|. |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 88 | Send(new SpeechRecognitionHostMsg_StartRequest(msg_params)); |
| 89 | } |
| 90 | |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 91 | void SpeechRecognitionDispatcher::Stop( |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 92 | const WebSpeechRecognitionHandle& handle, |
| 93 | WebSpeechRecognizerClient* recognizer_client) { |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 94 | // Ignore a |stop| issued without a matching |start|. |
| 95 | if (recognizer_client_ != recognizer_client || !HandleExists(handle)) |
| 96 | return; |
| 97 | Send(new SpeechRecognitionHostMsg_StopCaptureRequest( |
| 98 | routing_id(), GetOrCreateIDForHandle(handle))); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 99 | } |
| 100 | |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 101 | void SpeechRecognitionDispatcher::Abort( |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 102 | const WebSpeechRecognitionHandle& handle, |
| 103 | WebSpeechRecognizerClient* recognizer_client) { |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 104 | // Ignore an |abort| issued without a matching |start|. |
| 105 | if (recognizer_client_ != recognizer_client || !HandleExists(handle)) |
| 106 | return; |
| 107 | Send(new SpeechRecognitionHostMsg_AbortRequest( |
| 108 | routing_id(), GetOrCreateIDForHandle(handle))); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | void SpeechRecognitionDispatcher::OnRecognitionStarted(int request_id) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 112 | recognizer_client_->DidStart(GetHandleFromID(request_id)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | void SpeechRecognitionDispatcher::OnAudioStarted(int request_id) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 116 | recognizer_client_->DidStartAudio(GetHandleFromID(request_id)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | void SpeechRecognitionDispatcher::OnSoundStarted(int request_id) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 120 | recognizer_client_->DidStartSound(GetHandleFromID(request_id)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | void SpeechRecognitionDispatcher::OnSoundEnded(int request_id) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 124 | recognizer_client_->DidEndSound(GetHandleFromID(request_id)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | void SpeechRecognitionDispatcher::OnAudioEnded(int request_id) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 128 | recognizer_client_->DidEndAudio(GetHandleFromID(request_id)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 129 | } |
| 130 | |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 131 | static WebSpeechRecognizerClient::ErrorCode WebKitErrorCode( |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 132 | SpeechRecognitionErrorCode e) { |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 133 | switch (e) { |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 134 | case SPEECH_RECOGNITION_ERROR_NONE: |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 135 | NOTREACHED(); |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 136 | return WebSpeechRecognizerClient::kOtherError; |
djmix.kim | 99db7e0 | 2015-04-22 07:23:08 | [diff] [blame] | 137 | case SPEECH_RECOGNITION_ERROR_NO_SPEECH: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 138 | return WebSpeechRecognizerClient::kNoSpeechError; |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 139 | case SPEECH_RECOGNITION_ERROR_ABORTED: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 140 | return WebSpeechRecognizerClient::kAbortedError; |
djmix.kim | a8a4009e | 2015-04-23 07:33:40 | [diff] [blame] | 141 | case SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 142 | return WebSpeechRecognizerClient::kAudioCaptureError; |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 143 | case SPEECH_RECOGNITION_ERROR_NETWORK: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 144 | return WebSpeechRecognizerClient::kNetworkError; |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 145 | case SPEECH_RECOGNITION_ERROR_NOT_ALLOWED: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 146 | return WebSpeechRecognizerClient::kNotAllowedError; |
djmix.kim | 99db7e0 | 2015-04-22 07:23:08 | [diff] [blame] | 147 | case SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 148 | return WebSpeechRecognizerClient::kServiceNotAllowedError; |
djmix.kim | 99db7e0 | 2015-04-22 07:23:08 | [diff] [blame] | 149 | case SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 150 | return WebSpeechRecognizerClient::kBadGrammarError; |
djmix.kim | 99db7e0 | 2015-04-22 07:23:08 | [diff] [blame] | 151 | case SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED: |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 152 | return WebSpeechRecognizerClient::kLanguageNotSupportedError; |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 153 | case SPEECH_RECOGNITION_ERROR_NO_MATCH: |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 154 | NOTREACHED(); |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 155 | return WebSpeechRecognizerClient::kOtherError; |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 156 | } |
| 157 | NOTREACHED(); |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 158 | return WebSpeechRecognizerClient::kOtherError; |
[email protected] | 9c4ca67 | 2012-08-02 11:32:45 | [diff] [blame] | 159 | } |
| 160 | |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 161 | void SpeechRecognitionDispatcher::OnErrorOccurred( |
| 162 | int request_id, const SpeechRecognitionError& error) { |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 163 | if (error.code == SPEECH_RECOGNITION_ERROR_NO_MATCH) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 164 | recognizer_client_->DidReceiveNoMatch(GetHandleFromID(request_id), |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 165 | WebSpeechRecognitionResult()); |
| 166 | } else { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 167 | recognizer_client_->DidReceiveError( |
[email protected] | 0a8d4275e | 2013-01-04 22:21:26 | [diff] [blame] | 168 | GetHandleFromID(request_id), |
| 169 | WebString(), // TODO(primiano): message? |
| 170 | WebKitErrorCode(error.code)); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 171 | } |
| 172 | } |
| 173 | |
| 174 | void SpeechRecognitionDispatcher::OnRecognitionEnded(int request_id) { |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 175 | // TODO(tommi): It is possible that the handle isn't found in the array if |
| 176 | // the user just refreshed the page. It seems that we then get a notification |
| 177 | // for the previously loaded instance of the page. |
| 178 | HandleMap::iterator iter = handle_map_.find(request_id); |
| 179 | if (iter == handle_map_.end()) { |
| 180 | DLOG(ERROR) << "OnRecognitionEnded called for a handle that doesn't exist"; |
| 181 | } else { |
| 182 | WebSpeechRecognitionHandle handle = iter->second; |
| 183 | // Note: we need to erase the handle from the map *before* calling didEnd. |
| 184 | // didEnd may call back synchronously to start a new recognition session, |
| 185 | // and we don't want to delete the handle from the map after that happens. |
| 186 | handle_map_.erase(request_id); |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 187 | recognizer_client_->DidEnd(handle); |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 188 | } |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 189 | } |
| 190 | |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 191 | void SpeechRecognitionDispatcher::OnResultsRetrieved( |
| 192 | int request_id, const SpeechRecognitionResults& results) { |
| 193 | size_t provisional_count = 0; |
| 194 | SpeechRecognitionResults::const_iterator it = results.begin(); |
| 195 | for (; it != results.end(); ++it) { |
| 196 | if (it->is_provisional) |
| 197 | ++provisional_count; |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 198 | } |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 199 | |
| 200 | WebVector<WebSpeechRecognitionResult> provisional(provisional_count); |
| 201 | WebVector<WebSpeechRecognitionResult> final( |
| 202 | results.size() - provisional_count); |
| 203 | |
| 204 | int provisional_index = 0, final_index = 0; |
| 205 | for (it = results.begin(); it != results.end(); ++it) { |
| 206 | const SpeechRecognitionResult& result = (*it); |
| 207 | WebSpeechRecognitionResult* webkit_result = result.is_provisional ? |
| 208 | &provisional[provisional_index++] : &final[final_index++]; |
| 209 | |
| 210 | const size_t num_hypotheses = result.hypotheses.size(); |
| 211 | WebVector<WebString> transcripts(num_hypotheses); |
| 212 | WebVector<float> confidences(num_hypotheses); |
| 213 | for (size_t i = 0; i < num_hypotheses; ++i) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 214 | transcripts[i] = WebString::FromUTF16(result.hypotheses[i].utterance); |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 215 | confidences[i] = static_cast<float>(result.hypotheses[i].confidence); |
| 216 | } |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 217 | webkit_result->Assign(transcripts, confidences, !result.is_provisional); |
[email protected] | fc88c1e | 2012-12-04 09:54:36 | [diff] [blame] | 218 | } |
| 219 | |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 220 | recognizer_client_->DidReceiveResults(GetHandleFromID(request_id), final, |
| 221 | provisional); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 222 | } |
| 223 | |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 224 | int SpeechRecognitionDispatcher::GetOrCreateIDForHandle( |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 225 | const WebSpeechRecognitionHandle& handle) { |
| 226 | // Search first for an existing mapping. |
| 227 | for (HandleMap::iterator iter = handle_map_.begin(); |
| 228 | iter != handle_map_.end(); |
| 229 | ++iter) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 230 | if (iter->second.Equals(handle)) |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 231 | return iter->first; |
| 232 | } |
| 233 | // If no existing mapping found, create a new one. |
| 234 | const int new_id = next_id_; |
| 235 | handle_map_[new_id] = handle; |
| 236 | ++next_id_; |
| 237 | return new_id; |
| 238 | } |
| 239 | |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 240 | bool SpeechRecognitionDispatcher::HandleExists( |
| 241 | const WebSpeechRecognitionHandle& handle) { |
| 242 | for (HandleMap::iterator iter = handle_map_.begin(); |
| 243 | iter != handle_map_.end(); |
| 244 | ++iter) { |
Blink Reformat | 1c4d759e | 2017-04-09 16:34:54 | [diff] [blame] | 245 | if (iter->second.Equals(handle)) |
[email protected] | c766aa9 | 2012-06-22 16:57:14 | [diff] [blame] | 246 | return true; |
| 247 | } |
| 248 | return false; |
| 249 | } |
| 250 | |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 251 | const WebSpeechRecognitionHandle& SpeechRecognitionDispatcher::GetHandleFromID( |
| 252 | int request_id) { |
| 253 | HandleMap::iterator iter = handle_map_.find(request_id); |
mbarbella | 324a169 | 2015-05-20 00:31:03 | [diff] [blame] | 254 | CHECK(iter != handle_map_.end()); |
[email protected] | 64d0922 | 2012-05-25 10:10:34 | [diff] [blame] | 255 | return iter->second; |
| 256 | } |
[email protected] | e9ff79c | 2012-10-19 21:31:26 | [diff] [blame] | 257 | |
| 258 | } // namespace content |