Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: chrome/browser/chromeos/arc/arc_tts_service.h

Issue 2180263002: Host side implementation of ARC tts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address last round. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | chrome/browser/chromeos/arc/arc_tts_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_tts_service.h
diff --git a/chrome/browser/chromeos/arc/arc_tts_service.h b/chrome/browser/chromeos/arc/arc_tts_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..9522c31efe4dea96a9a84f5fe3686112ebb5ff6f
--- /dev/null
+++ b/chrome/browser/chromeos/arc/arc_tts_service.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_TTS_SERVICE_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_ARC_TTS_SERVICE_H_
+
+#include "base/macros.h"
+#include "components/arc/arc_service.h"
+#include "components/arc/common/tts.mojom.h"
+#include "components/arc/instance_holder.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace arc {
+
+class ArcBridgeService;
+
+// Provides text to speech services and events to Chrome OS via Android's text
+// to speech API.
+class ArcTtsService : public ArcService,
+ public InstanceHolder<mojom::TtsInstance>::Observer,
+ public mojom::TtsHost {
+ public:
+ explicit ArcTtsService(ArcBridgeService* bridge_service);
+ ~ArcTtsService() override;
+
+ // InstanceHolder<mojom::TtsInstance>::Observer overrides:
+ void OnInstanceReady() override;
+
+ // mojom::TtsHost overrides:
+ void OnTtsEvent(uint32_t id,
+ mojom::TtsEventType event_type,
+ uint32_t char_index,
+ const mojo::String& error_msg) override;
+
+ private:
+ mojo::Binding<mojom::TtsHost> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcTtsService);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_TTS_SERVICE_H_
« no previous file with comments | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | chrome/browser/chromeos/arc/arc_tts_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698