initial implementation crosswalk w3c speech extension
[profile/ivi/speech-recognition.git] / src / plugins / client-api / w3c-speech / crosswalk-extension / speech_extension.cc
1 // Copyright (c) 2014 Intel Corporation. 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 "speech_extension.h"
6
7 #include "speech_logs.h"
8 #include "speech_instance.h"
9
10 std::ofstream _s_f_log;
11
12 common::Extension* CreateExtension() {
13   return new SpeechExtension();
14 }
15
16 // This will be generated from speech_api.js
17 extern const char kSource_speech_api[];
18
19 SpeechExtension::SpeechExtension() {
20   SetExtensionName("tizen.speechSynthesis");
21   SetJavaScriptAPI(kSource_speech_api);
22   const char *entry_pointer[] = {
23     "tizen.SpeechRecognition",
24     "tizen.SpeechSynthesisUtterance",
25     NULL
26   };
27   SetExtraJSEntryPoints(entry_pointer);
28 }
29
30 SpeechExtension::~SpeechExtension() {}
31
32 common::Instance* SpeechExtension::CreateInstance() {
33   LOG_INIT();
34   return new SpeechInstance;
35 }