| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/extensions/extension_tts_api_controller.h" | 5 #include "chrome/browser/speech/extension_api/tts_extension_api_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/float_util.h" | 10 #include "base/float_util.h" |
| 11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/extensions/extension_event_router.h" | 13 #include "chrome/browser/extensions/extension_event_router.h" |
| 14 #include "chrome/browser/extensions/extension_tts_api.h" | |
| 15 #include "chrome/browser/extensions/extension_tts_api_constants.h" | |
| 16 #include "chrome/browser/extensions/extension_tts_api_platform.h" | |
| 17 #include "chrome/browser/extensions/extension_tts_engine_api.h" | |
| 18 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/speech/extension_api/tts_extension_api.h" |
| 16 #include "chrome/browser/speech/extension_api/tts_extension_api_constants.h" |
| 17 #include "chrome/browser/speech/extension_api/tts_extension_api_platform.h" |
| 18 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
| 19 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/common/extensions/extension.h" |
| 20 | 20 |
| 21 namespace constants = extension_tts_api_constants; | 21 namespace constants = tts_extension_api_constants; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // A value to be used to indicate that there is no char index available. | 25 // A value to be used to indicate that there is no char index available. |
| 26 const int kInvalidCharIndex = -1; | 26 const int kInvalidCharIndex = -1; |
| 27 | 27 |
| 28 namespace events { | 28 namespace events { |
| 29 const char kOnEvent[] = "tts.onEvent"; | 29 const char kOnEvent[] = "tts.onEvent"; |
| 30 }; // namespace events | 30 }; // namespace events |
| 31 | 31 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 int ExtensionTtsController::QueueSize() { | 328 int ExtensionTtsController::QueueSize() { |
| 329 return static_cast<int>(utterance_queue_.size()); | 329 return static_cast<int>(utterance_queue_.size()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 ExtensionTtsPlatformImpl* ExtensionTtsController::GetPlatformImpl() { | 332 ExtensionTtsPlatformImpl* ExtensionTtsController::GetPlatformImpl() { |
| 333 if (!platform_impl_) | 333 if (!platform_impl_) |
| 334 platform_impl_ = ExtensionTtsPlatformImpl::GetInstance(); | 334 platform_impl_ = ExtensionTtsPlatformImpl::GetInstance(); |
| 335 return platform_impl_; | 335 return platform_impl_; |
| 336 } | 336 } |
| OLD | NEW |