| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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_CHROMEOS_ARC_ARC_TTS_SERVICE_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_TTS_SERVICE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/arc/arc_service.h" | |
| 10 #include "components/arc/common/tts.mojom.h" | |
| 11 #include "components/arc/instance_holder.h" | |
| 12 #include "mojo/public/cpp/bindings/binding.h" | |
| 13 | |
| 14 namespace arc { | |
| 15 | |
| 16 class ArcBridgeService; | |
| 17 | |
| 18 // Provides text to speech services and events to Chrome OS via Android's text | |
| 19 // to speech API. | |
| 20 class ArcTtsService : public ArcService, | |
| 21 public InstanceHolder<mojom::TtsInstance>::Observer, | |
| 22 public mojom::TtsHost { | |
| 23 public: | |
| 24 explicit ArcTtsService(ArcBridgeService* bridge_service); | |
| 25 ~ArcTtsService() override; | |
| 26 | |
| 27 // InstanceHolder<mojom::TtsInstance>::Observer overrides: | |
| 28 void OnInstanceReady() override; | |
| 29 | |
| 30 // mojom::TtsHost overrides: | |
| 31 void OnTtsEvent(uint32_t id, | |
| 32 mojom::TtsEventType event_type, | |
| 33 uint32_t char_index, | |
| 34 const mojo::String& error_msg) override; | |
| 35 | |
| 36 private: | |
| 37 mojo::Binding<mojom::TtsHost> binding_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(ArcTtsService); | |
| 40 }; | |
| 41 | |
| 42 } // namespace arc | |
| 43 | |
| 44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_TTS_SERVICE_H_ | |
| OLD | NEW |