Jenny Zhang | fcf6f0e | 2021-10-08 22:16:21 | [diff] [blame] | 1 | // Copyright 2021 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 | #ifndef CHROME_BROWSER_SPEECH_TTS_CROSAPI_UTIL_H_ |
| 6 | #define CHROME_BROWSER_SPEECH_TTS_CROSAPI_UTIL_H_ |
| 7 | |
| 8 | #include "chromeos/crosapi/mojom/tts.mojom.h" |
| 9 | #include "content/public/browser/tts_controller.h" |
| 10 | |
| 11 | namespace tts_crosapi_util { |
| 12 | |
| 13 | // Functions for converting Tts data types to/from its corresponding mojo types. |
| 14 | content::TtsEventType FromMojo(crosapi::mojom::TtsEventType mojo_event); |
| 15 | crosapi::mojom::TtsEventType ToMojo(content::TtsEventType event_type); |
| 16 | content::VoiceData FromMojo(const crosapi::mojom::TtsVoicePtr& mojo_voice); |
| 17 | crosapi::mojom::TtsVoicePtr ToMojo(const content::VoiceData& voice); |
| 18 | |
| 19 | } // namespace tts_crosapi_util |
| 20 | |
| 21 | #endif // CHROME_BROWSER_SPEECH_TTS_CROSAPI_UTIL_H_ |