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

Side by Side Diff: chrome/browser/chromeos/arc/tts/arc_tts_service.h

Issue 2495913002: arc: Convert more Mojo types to STL (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_
7 7
8 #include <string>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "components/arc/arc_service.h" 11 #include "components/arc/arc_service.h"
10 #include "components/arc/common/tts.mojom.h" 12 #include "components/arc/common/tts.mojom.h"
11 #include "components/arc/instance_holder.h" 13 #include "components/arc/instance_holder.h"
12 #include "mojo/public/cpp/bindings/binding.h" 14 #include "mojo/public/cpp/bindings/binding.h"
13 15
14 namespace arc { 16 namespace arc {
15 17
16 class ArcBridgeService; 18 class ArcBridgeService;
17 19
18 // Provides text to speech services and events to Chrome OS via Android's text 20 // Provides text to speech services and events to Chrome OS via Android's text
19 // to speech API. 21 // to speech API.
20 class ArcTtsService : public ArcService, 22 class ArcTtsService : public ArcService,
21 public InstanceHolder<mojom::TtsInstance>::Observer, 23 public InstanceHolder<mojom::TtsInstance>::Observer,
22 public mojom::TtsHost { 24 public mojom::TtsHost {
23 public: 25 public:
24 explicit ArcTtsService(ArcBridgeService* bridge_service); 26 explicit ArcTtsService(ArcBridgeService* bridge_service);
25 ~ArcTtsService() override; 27 ~ArcTtsService() override;
26 28
27 // InstanceHolder<mojom::TtsInstance>::Observer overrides: 29 // InstanceHolder<mojom::TtsInstance>::Observer overrides:
28 void OnInstanceReady() override; 30 void OnInstanceReady() override;
29 31
30 // mojom::TtsHost overrides: 32 // mojom::TtsHost overrides:
31 void OnTtsEvent(uint32_t id, 33 void OnTtsEvent(uint32_t id,
32 mojom::TtsEventType event_type, 34 mojom::TtsEventType event_type,
33 uint32_t char_index, 35 uint32_t char_index,
34 const mojo::String& error_msg) override; 36 const std::string& error_msg) override;
35 37
36 private: 38 private:
37 mojo::Binding<mojom::TtsHost> binding_; 39 mojo::Binding<mojom::TtsHost> binding_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(ArcTtsService); 41 DISALLOW_COPY_AND_ASSIGN(ArcTtsService);
40 }; 42 };
41 43
42 } // namespace arc 44 } // namespace arc
43 45
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_ 46 #endif // CHROME_BROWSER_CHROMEOS_ARC_TTS_ARC_TTS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698